Building Visual Studio 2015 C++ project (v140) by MSBuild Failed - v140 cannot be found

自作多情 提交于 2019-12-02 22:26:33

Your problem is that you set the environment variable VisualStudioVersion to 12.0. This tells MSBuild to use the Visual Studio 2013 (V120) tools, which don't support the Visual Studio 2015 (V140) build tools. If you unset this environment variable, or pass the /p:VisualStudioVersion=14.0 option to MSBuild your project, should build. (Or at least get past this error).

You can find more information about the VisualStudioVersion variable in a MSDN blog entry titled Visual Studio project compatibility and VisualStudioVersion.

One solution is that you can simply change the platform toolset that is available in your system. Then it build fine.

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