I have an app and shared library with separate CC build triggers (a successful library build will also trigger a build of the app), with a queue set up to make sure that CC doesn't attempt to build the app until the library is finished.
Something weird happened this morning. I'm working over a slowish VPN and committed a bunch of changes to my app and a shared library (this was all done as a single commit). CC did a build of my app first which failed because it couldn't find two new classes in the shared library. After this the shared library built successfully, followed by my app building successfully.
It looks like CC attempted to build after the changes to my app had been downloaded to the build server, but before the changes to the library had arrived. Is this possible, or do I need to look elsewhere to find out what was the cause?
This is the error I got in the build log for the application:
<error code="CS0246" file="SomeClass.cs" line="###" column="###"><![CDATA[The type or namespace name 'ClassAddedToSharedLibraryInThisCommit' could not be found (are you missing a using directive or an assembly reference?)]]></error>
An excerpt from my CCnet.config file is below:
<project name="App1" queue="hourly" queuePriority="2">
<triggers>
<multiTrigger operator="Or">
<triggers>
<projectTrigger project="sharedLib">
<triggerStatus>Success</triggerStatus>
<innerTrigger type="intervalTrigger" seconds="30" buildCondition="ForceBuild"/>
</projectTrigger>
<filterTrigger startTime="16:00" endTime="7:00">
<trigger type="intervalTrigger" seconds ="625" />
</filterTrigger>
</triggers>
</multiTrigger>
</triggers>
<sourcecontrol type="svn">
<tagOnSuccess>false</tagOnSuccess>
<tagBaseUrl>https://servername/...</tagBaseUrl>
<autoGetSource>true</autoGetSource>
<executable>c:\program files\subversion\bin\svn.exe</executable>
<trunkUrl>https://servername/.../App1/...</trunkUrl>
<workingDirectory>C:\svn\...\App1\...</workingDirectory>
</sourcecontrol>
<tasks>
<msbuild>
<executable>C:\WINDOWS\Microsoft.NET\Framework\v3.5\msbuild.exe</executable>
<workingDirectory>C:\svn\...\App1\...</workingDirectory>
<projectFile>App1.sln</projectFile>
<buildArgs>/p:Configuration=Debug /v:m /m</buildArgs>
<logger>C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
<timeout>1000000</timeout>
</msbuild>
</tasks>
</project>
<project name="sharedLib" queue="hourly" queuePriority="1">
<triggers>
<filterTrigger startTime="16:00" endTime="7:00">
<trigger type="intervalTrigger" seconds ="350" />
</filterTrigger>
</triggers>
<sourcecontrol type="svn">
<tagOnSuccess>false</tagOnSuccess>
<tagBaseUrl>https://servername/...</tagBaseUrl>
<autoGetSource>true</autoGetSource>
<executable>c:\program files\subversion\bin\svn.exe</executable>
<trunkUrl>https://https://servername/.../SharedLib/...</trunkUrl>
<workingDirectory>C:\svn\...\sharedLib\...</workingDirectory>
</sourcecontrol>
<tasks>
<msbuild>
<executable>C:\WINDOWS\Microsoft.NET\Framework\v3.5\msbuild.exe</executable>
<workingDirectory>C:\svn\...\sharedLib\...</workingDirectory>
<projectFile>sharedLib.csproj</projectFile>
<buildArgs>/p:Configuration=Debug /v:m /m</buildArgs>
<logger>C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
<timeout>1000000</timeout>
</msbuild>
</tasks>
</project>