2
votes

Just installed a new version of TC and it seems not to be using the right MSbuild version for deployment.

C:\TeamCity\buildAgent\work\3378319287fedcd4\Source\UI\OneBody.Web\OneBody.Web.csproj(927, 3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

I have the \WebApplications folder on \VisualStudio\V12.0\WebApplications, my \v11.0 folder is only showing \OfficeTools, \TypeScript.

Any ideas on how to make it use the right version?

2

2 Answers

2
votes

there is a MSBuild ToolsVersion: field

check the image: http://img.hihi.si/Upload/Pftp.png

Here you can select which MSbuild version you want to use.

You can also use Visual Studio runner and select its version (2010,2012,2013,..)

VS2012 uses msbuild v11
VS2013 uses msbuild v12

0
votes

It would be better to remove the dependency completely for installed visual studio version and update the reference to use the nuget version of web.application targets. A nuget package for this reference: https://www.nuget.org/packages/MSBuild.Microsoft.VisualStudio.Web.targets/

is available.