##[warning]Visual Studio version '14.0' no

2020-04-20 05:47发布

My project need to be run with MSbuild 14.0(visual studio 2015) but this is taking only Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe .

I have installed visual studio community 2017,VS 2015 web and Desktop express on my Build Agent. Capabilities of build agent- enter image description here

Task Configuration - enter image description here

This configuration giving me the warning -

[warning]Visual Studio version '14.0' not found. Falling back to version '15.0'.

How can I use MSBuild 14.0 with Visual Studio build task .?? This is running with MSbuild task..

Thanks in Advance ..!!

1条回答
Explosion°爆炸
2楼-- · 2020-04-20 06:42

[warning]Visual Studio version '14.0' not found. Falling back to version '15.0'

Since I do not install Visual Studio 2015 Express for Desktop and Web on my build agent, I am not sure whether Visual Studio 2015 Express for Desktop and Web is compatible with build agent.

But I found a thread about it, you can check the comment on the accepted answer:

That's it! For some reason VS2015 Express does not install the ShellFolder or InstallDir keys! I was worried that the agent script recognised it but refused to register it because we are not allowed to use it for automated builds. I feel more comfortable with it now.

It turns out that is not the full story. When I add the "Visual Studio Build" task to the process, it now executes, but if I look more closely at the log, I can see the following message: "##[warning]Visual Studio was not found. Try installing a supported version of Visual Studio. See the task definition for a list of supported versions." And then it falls back to building with MSBuild. It works because I am building a .sln; let's just hope I don't have to build a .proj.

So, it seems that Visual Studio 2015 Express is not compatible with build agent. you can try to install the Visual Studio community 2015 instead of it, which I can build it without any issue.

Again, you can check if there is a parameter about Visual Studio on your Capabilities of build agent when you use Visual Studio 2015 Express:

enter image description here

if not, build agent will throw that error.

Hope this helps.

查看更多
登录 后发表回答