Hi All,
I have a project that currently compiles happily on my dev machine using VS 2010 (presumably using MSBUILD v4.0), but it fails under MSBUILD v3.5 in Team City (running on a VM based on Win 2003 server w/ .NET 2, 3.5 and 4 installed). This project is newly upgraded to 2010, and is now failing on the CI build. I've Googled this and tried everything obvious (plus a few things that didn't make sense) and nothing affects the outcome.
The project fails with a sequence of errors like this:
error CS0234: The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?)
There are numerous other projects in the solution that use System.Core, System.Data.Linq and System.Xml.Linq and they all seem to compile with no problems. The project in question is a web application, and it has the following settings in its configuration/system.web/compilation/assemblies section:
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
Plus the following in the same file:
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
</compilers>
</system.codedom>
The project in question is, IIRC, the only project in my solution that is both a WebApplication and is getting post-processed by PostSharp (v1.5). PostSharp is configured in the .csproj like so:
<PropertyGroup>
<DontImportPostSharp>True</DontImportPostSharp>
<PostSharpUseCommandLine>True</PostSharpUseCommandLine>
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(POSTSHARP15)\PostSharp-1.5.targets" />
I'm not sure how this could be related, but it's there just in case.
Any ideas on what's causing this error or on how to work around the issue?
TIA