Reputation: 1138
I'll try and be as precise as possible on this one. I have a VS 2013 solution with several projects all targeting the .NET 4.5 Framework. When I run a build against a build agent that has VS 2012 and the .NET 4.5 Framework, I get several errors, all relative to the Project.UnitTests project, that look like this:
Built Project.UnitTests.csproj for default targets...
error CS0234: The type or namespace name 'Business' does not exist in the namespace 'Project' (are you missing an assembly reference?) [C:\Builds\37\Project\Project_v2.0.0\Sources\Source\Project.UnitTests\Project.UnitTests.csproj]
When I run the same build against an agent that is running VS 2010 and the .NET 4.0 Framework, it builds successfully.
Here is the basic layout of the solution I am working with:
Project.Business
Project.Business.Services
- Depends on PProject.Business
Project.Console
- Depends on Project.Business
- Depends on Project.Business.Services
Project.UnitTests
- Depends on Project.Business
- Depends on Project.Business.Services
Build Order:
Project.Business
Project.Business.Services
Project.Console
Project.UnitTests
This is the configuration of the build agents I am working with:
Build Agent 1
- Windows 7 32-bit
- TFS 2010 SP1
- VS 2010
- .NET Framework 4.0
Build Agent 2
- Windows 7 64-bit
- TFS 2010 SP1
- VS 2012
- .NET Framework 4.5
The build succeeds on Agent 1, but fails on Agent 2. The only project that is failing in this whole thing is Project.UnitTests. Really not sure where to go with this one. Tried to keep this one as short as possible, but if it's too short on details I can provide whatever additional info is needed.
Edit 1: All projects are set to build using the "Release | Any CPU" configuration. If I change them all to "Debug | Any CPU", the build will succeed on both Agent 1 and 2.
Upvotes: 0
Views: 1039
Reputation: 22245
RDP into the Build Server (as the Build Service account if possible). Fire up VS 2012, open the solution from the build working directory, and try to build it. Specifically look in the references dialog and see if any have exclamations next to them and diagnose.
If that's not an option, turn on diagnostic logging (in the options when you queue the build), then examine the MSBuild log and see if it's failing to locate any references (I suspect it is).
Upvotes: 1