
Other answers here set this variable to c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140 but I noticed in my visual studio installation, there was no folder called Microsoft.Cpp in my MSBuild folder. If using Visual Studio 2019 Community version, C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160


What worked for me, if using Visual Studio 2017 Community version, was setting an environment variable called VCTargetsPath and giving it a value of C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets Please let me know if you have any ideas what's blocking the proper setting of this variable.Ī lot of the answers here apply to older versions of Visual Studio. It appears that MSBuildExtensionsPath32 isn't being set properly and setting MSBuildExtensionsPath doesn't help SET MSBuildExtensionsPath="C:\Program Files\MSBuild"

HKLM\SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolVersions\V4.0 VCTargetsPath set to $(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\.

msbuild located c:\Program File (x86)\MSBuild.When I run msbuild to build a vc2010 project I get the following error: error MSB4019: The imported project "C:\" was not found.Ĭonfirm that the path in the declaration is correct, and that the file exists
