I have a project that was recently upgraded from VS2008 to VS2010 and then from .NET 2.0 to .NET 3.5.
When I use MSBuild on the local machine, the CSC task emits, among a long list of other references this one: "/reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll".
In TeamCity, the build messages include roughly the same Csc.exe output only it is MISSING the above reference.
The result is that a file with a reference to Linq won't compile (it needs System.Core.dll)
If I copy the CSC task output from TeamCity and run it locally, I get the same error. If I add in the missing "/reference..." it runs just fine.
Locally, MSBuild is using the CSC from the 4.0 framework (C:\windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe)
TeamCity is using the CSC from the 3.5 framework (C:\Windows\Microsoft.NET\Framework\v3.5\Csc.exe)
I have tried setting the MSBuild version to 4.0 and the Tools version to 3.5 in TeamCity but then I get some odd SGEN error messages complaining about a mismatch.
My question is this: why isn't the TeamCity MSBuild 3.5 version emitting a reference to System.Core? How can I get TeamCity to compile this project?