UpdateAssemblyInfo - CreateItem task failed

Nov 14, 2012 at 1:58 PM


We are running MSBuild from CruiseControl.net.  
We have one branch that, when built on the build server via CC, fails with the following error: 
<target name="UpdateAssemblyInfo" startTime="11/13/2012 18:48:35" elapsedTime="00:00:01" elapsedSeconds="1" success="false">       
<error code="MSB4018" file="C:\Continuous Integration Projects\Project\Release\Build\Master.build" line="88" column="5" timeStamp="11/13/2012 18:48:36"><![CDATA[The "CreateItem" task failed unexpectedly.System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.   at System.IO.PathHelper.GetFullPathName()

The error goes on for many more lines...

The task is defined in master.build:
<Target Name="UpdateAssemblyInfo">   
    <CreateItem Include="$(SourcePath)\**\Properties\AssemblyInfo.cs">     
        <Output TaskParameter="Include" ItemName="UpdateAssemblyInfoFiles"/>
    <Attrib Files="@(UpdateAssemblyInfoFiles)" Normal="true" />   
    <AssemblyInfo AssemblyInfoFiles="@(UpdateAssemblyInfoFiles)"   AssemblyVersion="$(CCNetLabel)" AssemblyFileVersion="$(CCNetLabel)"/> 
How can we figure out which AssemblyInfo.cs is causing the problem? 

Thanks for any insight...

Dec 5, 2012 at 1:49 PM

try this



<Attrib Files="@(UpdateAssemblyInfoFiles)" Normal="true" />    

 <Message Text="%(UpdateAssemblyInfoFiles.Identity)"/>

 <AssemblyInfo AssemblyInfoFiles="%(UpdateAssemblyInfoFiles.Identity)"   AssemblyVersion="$(CCNetLabel)" AssemblyFileVersion="$(CCNetLabel)"/>  


Marked as answer by mikeFourie on 5/26/2014 at 4:00 AM
Dec 6, 2012 at 1:01 PM

Thanks, I'll try that.