Microsoft Build Tools 2013 missing v120 directory

前端 未结 2 704
走了就别回头了
走了就别回头了 2021-01-31 20:21

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)\

2条回答
  •  醉梦人生
    2021-01-31 20:57

    The answer is yes, you need to install VS2013. Then add a new string value named VCTargetsPath12 to

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolsVersions\12.0\11.0

    The value should be:

    $([MSBuild]::ValueOrDefault('$(VCTargetsPath12)','$(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\V120\'))
    

    You also need to change the

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolsVersions\12.0\11.0\VCTargetsPath

    value to:

    $([MSBuild]::ValueOrDefault('$(VCTargetsPath)','$(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\V120\'))
    

    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.

    If you get some "SetEnv" related errors just rebuild those projects that failed.

    Verified on multiple machines to work.

提交回复
热议问题