can't use dynamicvalues for <files> within a <merge> task (Bug #99)

Added by Rami AbuGhazaleh about 6 years ago. Updated almost 6 years ago.

Status:New Start date:04/05/2012
Priority:Normal Due date:
Assignee:- % Done:


Category:- Spent time: -
Target version:1.9
Affected version:1.6



Thank you for CCNet v1.6.7981.1.

I can't seem to use dynamicValues for <files> within a <merge> task.

For example,
<project name="project1" >
<display>dynamic value 1</display>

Produces the following exception:
2012-04-05 12:42:30,386 [project1:ERROR] Publisher threw exception: System.InvalidCastException: Invalid cast from 'System.String' to 'ThoughtWorks.CruiseControl.Core.Tasks.MergeFileInfo'.
at System.Convert.DefaultToType(IConvertible value, Type targetType, IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at ThoughtWorks.CruiseControl.Core.Tasks.DynamicValueUtility.PropertyValue.ChangePropertyValue(Object value)
at ThoughtWorks.CruiseControl.Core.Tasks.TaskBase.ApplyParameters(Dictionary`2 parameters, IEnumerable`1 parameterDefinitions)
at ThoughtWorks.CruiseControl.Core.Project.PublishResults(IIntegrationResult result, Dictionary`2 parameterValues)

Here are some links for reference:


Updated by Olivier Sannier about 6 years ago

I believe this is a duplicate of Issue #48

Updated by Rami AbuGhazaleh almost 6 years ago

I still see this issue happening in ccnet server 1.7.741.8065.

Updated by Rami AbuGhazaleh almost 6 years ago

I also noticed this in the ccnet.log file when the ccnet service starts:
[CCNet Server:DEBUG] MergeFilesTask: Add '' to 'Merge' file list.

This seems to indicate that the project/publishers/merge/files/file elements are not evaluated at build time which would be required to use dynamic values.

It seems this is because the "files" reflector property (i.e. MergeFiles) has a custom serializer factory.

Updated by Ruben Willems almost 6 years ago

remove the custom serialiser : all problems solved
but this is a breaking change, that's why moved to 1.9

  • Target version set to 1.9

Also available in: Atom PDF