问题描述
我们已经从 http://www安装了Microsoft Build Tools 2013. microsoft.com/en-us/download/details.aspx?id=40760 ,但安装后没有C:\ Program Files(x86)\ MSBuild \ Microsoft.Cpp \ v4.0 \ V120目录已创建,因此找不到所需的目标文件.
We've installed the Microsoft Build Tools 2013, from http://www.microsoft.com/en-us/download/details.aspx?id=40760, but after installation, there is no C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120 directory created, and so it cannot find required targets files.
我们是否真的需要安装VS2013版本才能创建所需的目标/道具文件?
Do we really need to install a version of VS2013 for the required targets/props files to be created?
推荐答案
答案是肯定的,您需要安装VS2013.然后将一个名为VCTargetsPath12
的新字符串值添加到
The answer is yes, you need to install VS2013. Then add a new string value named VCTargetsPath12
to
值应为:
$([MSBuild]::ValueOrDefault('$(VCTargetsPath12)','$(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\V120\'))
您还需要更改
值:
$([MSBuild]::ValueOrDefault('$(VCTargetsPath)','$(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\V120\'))
如果某些项目仍然存在问题,请打开.vcxproj文件,并确保将Project元素的ToolsVersion属性设置为12.0,而不是4.0.对.vcxproj.filters执行相同的操作.
If you continue to have problems with some projects, open the .vcxproj file and make sure the Project element's ToolsVersion attribute is set to 12.0 instead of 4.0. Do the same for the .vcxproj.filters.
如果遇到一些与"SetEnv"相关的错误,只需重建失败的项目.
If you get some "SetEnv" related errors just rebuild those projects that failed.
已在多台计算机上验证可正常工作.
Verified on multiple machines to work.
这篇关于Microsoft Build Tools 2013缺少v120目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!