I am having an issue trying to merge the outputs of FxCop, StyleCop and a few other xml files into the build.
My configuration looks like this:
<publishers>
<merge>
<files>
<file>$(ArtifactsFolder)\$(ProjectName)\$(CCBuildVersion)\logs\*.xml</file>
</files>
</merge>
<xmllogger logDir="$(ArtifactsFolder)\$(ProjectName)\$(CCBuildVersion)\logs"/>
</publishers>
The $(CCBuildVersion) comes from the ccnet.config file which looks like this:
<cb:define CCBuildVersion="$[$CCNetLabel]" />
A few things to tell you before you start answering:
- The xml files DO exist and are in the same directory as the outputted build log from ccnet
- The xml files seem to be valid, I cannot find anything wrong other than StyleCop has no Xml descriptor at the top, it just goes directly into the root node
The only thing I can think of is that because I am using a dynamic variable that it may not get the right directory when it parses the configuration, but that being said, everything outputs in the right place...
I have gone over EVERY line in the temp log, and have found the following:
2011-10-27 09:50:23,724 [ProjectName: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.String.System.IConvertible.ToType(Type type, 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.DynamicValueUtility.PropertyValue.ChangeProperty(Object value)
at ThoughtWorks.CruiseControl.Core.Tasks.ReplacementDynamicValue.ApplyTo(Object value, Dictionary`2 parameters, IEnumerable`1 parameterDefinitions)
at ThoughtWorks.CruiseControl.Core.Tasks.TaskBase.ApplyParameters(Dictionary`2 parameters, IEnumerable`1 parameterDefinitions)
at ThoughtWorks.CruiseControl.Core.Project.PublishResults(IIntegrationResult result, Dictionary`2 parameterValues)
Tried googling it and not getting any relevant matches, anyone ever had this before?