C# 3.0 features fail to compile in MSBuild project

I have a .csproj file created by VS2008 (it was upgraded from VS2005 project at some point). Target framework is set to 3.5 in VS2008 and the project builds fine there.

In TeamCity (build 6010) I created an MSBuild runner with .NET version set to 3.5. It fails any new C# 3.0 features, since it looks like old C# 2.0 compiler is used.

1 comment

Hello,
Could you please try as a workaround to set-up msbuild runner with
.NET 3.5 option selected. Does that able to build your project.

Please check if you project files have 'ToolsVersion' attribute with value
'3.5' on the root element.

Thanks!
--
Eugene Petrenko
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

I have a .csproj file created by VS2008 (it was upgraded from VS2005
project at some point). Target framework is set to 3.5 in VS2008 and
the project builds fine there.

In TeamCity (build 6010) I created an MSBuild runner with .NET version
set to 3.5. It fails any new C# 3.0 features, since it looks like old
C# 2.0 compiler is used.



0

Please sign in to leave a comment.