平台工具构建错误 [英] Platform Tool Building Error

查看:72
本文介绍了平台工具构建错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我在编译代码时遇到问题,错误代码是MSB802:无法找到v140的构建工具(Platform Toolset ='v140') 。但是,我检查了项目菜单中的项目属性,结果是Visual Studio 2015(v140)。
我想知道为什么VS无法检测到它?

解决方案

你好yy_lsk,


<感谢您在此处发帖。


您的问题是您可以将环境变量 VisualStudioVersion 设置为12.0或其他版本。  ;这告诉MSBuild使用Visual Studio 2013(V120)工具,它们不支持Visual Studio 2015(V140)构建工具。
如果您取消设置此环境变量,或传递

 / p:VisualStudioVersion = 14.0 

选项在使用MSBuild命令行构建项目时,该错误应该过去。


如果上面没有帮助,请与我们分享详细信息 在输出窗口中构建错误?您是否安装了其他版本的Visual Studio?


谢谢。


Hi guys,

I have the trouble compiling code saying that the error code is MSB802: The build tool for v140 (Platform Toolset ='v140') cannot be found. However, I have check the project properties in the project menu and it turns out to be Visual Studio 2015 (v140). I wonder why VS can't detect that?

解决方案

Hi yy_lsk,

Thanks for posting here.

Your problem is that you may set the environment variable VisualStudioVersion to 12.0 or other version.  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 when build your project using MSBuild command line, that error should be get past.

If above not help you, could you please share us the detail build error in the output window? Have you install other version visual Studio?

Thanks.


这篇关于平台工具构建错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆