Microsoft Build Tools 2013 missing v120 directory

41,495

Solution 1

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.

Solution 2

NOTE: Weirdly this did only work for debug configuration. There seems to be missing some parts afterall. I ended up installing VS2013 express.

If you are ok with having Visual Stuido 2015 installed you can either change your VS2015 current isntallation or newly install it. From the 2015 installer, select Windows 8.1 and Windows Phone 8.0/8.1 Tools and common Tools for Visual C++ 2015:

enter image description here

After installation completed, you will find the platform Toolset below (in my case VS2017):

enter image description here

Credits: https://stackoverflow.com/a/42687137/4870255

Share:
41,495
Richard Anthony Freeman-Hein
Author by

Richard Anthony Freeman-Hein

I started programming when I was 7 years old, sitting on my father's lap, taking turns reading and writing code on a TRS-80 CoCo. I have over 25 years of experience developing software. I love Racket, Haskell, C#, and have recently embraced Typescript after years of resistance and loving the newest features. Stacks of choice are .NET 5, Mono, Unity, the UNO Platform, and IHP at the moment.

Updated on July 09, 2022

Comments

  • Richard Anthony Freeman-Hein
    Richard Anthony Freeman-Hein almost 2 years

    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.

    Do we really need to install a version of VS2013 for the required targets/props files to be created?