ms build 4 as build runner problems

Hi,
I am setting up automatic building of my ASP.NET MVC project, using TeamCity
Project is based on .Net Framework 4.
When i specify settings of build runner, i choose msbuild as buildrunner, 4 as .net version, and x64 as my platform.
But when build starts, i get following  error

Start MSBuild...

'C:\Windows\Microsoft.NET\Framework64\v2.0.50727\MSBuild.exe'  '@"D:\TeamCity\buildAgent\work\85cbf15f526769b3\EasySite.sln.teamcity.msbuild.tcargs"   "D:\TeamCity\buildAgent\work\85cbf15f526769b3\EasySite.sln.teamcity.patch.tcprojx"'
working dir = 'D:\TeamCity\buildAgent\work\85cbf15f526769b3'

Microsoft (R) Build Engine Version 2.0.50727.4927
[Microsoft .NET Framework, Version 2.0.50727.4927]
Copyright (C) Microsoft Corporation 2005. All rights reserved.


Build started 2/5/2010 6:07:25 PM.
__________________________________________________

Project  "D:\TeamCity\buildAgent\work\85cbf15f526769b3\EasySite.sln.teamcity.patch.tcprojx"  (Build_TeamCity_generated_a3342b66b03242c7ac84fbb054f072ad target(s)):


Target Build_TeamCity_generated_a3342b66b03242c7ac84fbb054f072ad:
D:\TeamCity\buildAgent\work\85cbf15f526769b3\EasySite.sln(2):  Solution file error MSB5014: File format version is not recognized.   MSBuild can only read solution files between versions 7.0 and 9.0,  inclusive.

Done building target  "Build_TeamCity_generated_a3342b66b03242c7ac84fbb054f072ad" in project  "EasySite.sln.teamcity.patch.tcprojx" -- FAILED.

Please note that runtime is picking up msbuild.exe from folder with .net framework 2 files, hence solution of version 10.0 is not recognized.
Please advice me what is an error

1 comment
Comment actions Permalink

TeamCity 5.0.x does not fully support .NET 4.
Please do the following workaround:

- set MSBuild environment variable with value %system.dotNetFramework4.0_Path%\MSBuild.exe
- select .NET 3.5 and tools version 3.5 from the build runner settings
- create the following MSBuild script:

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Target Name="Build">
     <MSBuild Projects="<Path to .sln>" Targets="Rebuild" ToolsVersion="4.0" Properties="Configuration=Release" />
  </Target>
</Project>


If you build ASP.NET project, please alose set MSBuildEmitSolution=1 environment variable.
0

Please sign in to leave a comment.