visual-studio - ##[警告]未找到 Visual Studio 版本 '14.0'。回退到版本 '15.0'

标签 visual-studio visual-studio-2015 tfs msbuild azure-devops

我的项目需要使用 MSbuild 14.0(visual studio 2015) 运行,但这只需要 Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe 。

我已经在我的 Build Agent 上安装了 visual studio community 2017、VS 2015 web 和 Desktop express。 构建代理的能力- enter image description here

任务配置 - enter image description here

此配置给我警告 -

[警告]未找到 Visual Studio 版本“14.0”。回退到“15.0”版本。

如何将 MSBuild 14.0 与 Visual Studio 构建任务结合使用??这是与 MSbuild 任务一起运行..

提前致谢..!!

最佳答案

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

由于我没有在我的构建代理上安装 Visual Studio 2015 Express for Desktop and Web,我不确定 Visual Studio 2015 Express for Desktop and Web 是否与构建代理兼容。

但我发现a thread关于它,您可以查看对已接受答案的评论:

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.

因此,Visual Studio 2015 Express 似乎与构建代理不兼容。您可以尝试安装 Visual Studio community 2015 而不是它,我可以毫无问题地构建它。

同样,您可以在使用 Visual Studio 2015 Express 时检查您的 Capabilities of build agent 中是否有关于 Visual Studio 的参数:

enter image description here

如果没有,构建代理将抛出该错误。

希望这对您有所帮助。

关于visual-studio - ##[警告]未找到 Visual Studio 版本 '14.0'。回退到版本 '15.0',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52926649/

相关文章:

tfs - 我怎样才能弄清楚我们正在使用哪种编程方法(如果有的话)?

visual-studio - Visual Studio 2005/2008 : How can you share/force all developers to use the same formatting rules?

c# - Emgu 3.0 缺少 MCvFont 库

c++ - 程序不显示显示处理和计时的窗口

visual-studio - 如何在TFS上撤消 “Get Latest Version”

visual-studio-2010 - 备份/恢复后修复不同步的 TFS 工作区的最佳方法

c# - 为什么调试包括外部库代码

c++ - 看不到 x264 库的日志

c++ - 所以我决定不再使用命名空间,但现在我应该什么时候添加 std::或 cv::?

c# - Visual Studio 2015发布错误