Make local TFS build agent to use v14 msbuild tools

点点圈 提交于 2019-12-06 05:02:35

问题


I've got a couple of ASP.NET vNext applications and I want my CI server to also be able to build them. Both my local machine and the CI server are running VS2015 RC. Then we've got VS Online and a local build controller - which is the server mentioned.

However, I cannot get builds going since it seems to be looking for v12 tooling - which does not include anything DNX.

So - building the solution gives:

The Dnx Runtime package needs to be installed. See output window for more details

It is installed - since it came with VS2015 RC, AFAIK. So I thought the build template isn't using v14 tooling. I downloaded the Default Git template v12. And indeed it says:

<this:Process.BuildProcessVersion>12.0</this:Process.BuildProcessVersion>

So I switched that to 14, uploaded template, ran build. Then:

Exception Message: The build controller used for this build does not support the version of the template file used by the build definition. The version of the template file is 14.0. The maximum supported version for this build controller is 12.0.0.0.

So trying to solve this - got me to this forum question that states:

Then, instead of changing the BuildProcessVersion property, you need to change the involved MSBuild version. Open the build process template, find the Run MSBuild for Project activity, change the ToolPath property to the 2013 version msbuild

So - I checked out the template - there is no ToolPath version. There is a ToolVersion property however - which I'll try setting to 14:

In short, my question is: how can I build ASP.NET vNext apps on my build server, that has VS2015RC installed - but is building using v12 tooling?

UPDATE

Seems that the problem is not as much in using the wrong tooling, but more in finding/using the correct DNX runtime while running under a service account ( which the TFS agent is doing ). I've added an issue for the DNX team: https://github.com/aspnet/dnx/issues/2239 .


回答1:


use msbuild parameter /p:VisualStudioVersion=14.0 ,which can be added in build definition .



来源:https://stackoverflow.com/questions/31067090/make-local-tfs-build-agent-to-use-v14-msbuild-tools

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!