Intermittent build failures

I have a solution with multiple projects. One of the projects will fail builds intermittently saying it cannot find a referenced assembly. The reference is to a project in the same solution. Example of the error found in the build log:

[Csc] Services\RandomService.cs(14, 11): error CS0234: The type or namespace name 'Common' does not exist in the namespace 'ABC' (are you missing an assembly reference?)

 

 

This project exists in the solution and the project builds just fine when pulling source from TFS. I can even remote into the Team City server, find the source code in the build agent directory and open it on the server in Visual Studio and it will compile without error. Interestingly enough, once I do this I can start another build manually, clicking run in the web interface, and it will build successfully. Has anyone run into this issue? I would like to identify the cause so this will not cause builds to fail.

 

 

 

0
1 comment

Hi Mike,

it would seem like the initial TeamCity build misses to either build some stuff or load some references, that then are created by your manual run, which enables TeamCity to run it successfully afterwards. Checking the build logs of the initial build and the builds afterwards might point you in the direction of what is missing before the failure.

0

Please sign in to leave a comment.