MSBuild does not contain a value for the “VCTargetsPath” property

后端 未结 10 813
南方客
南方客 2020-12-07 14:06

I recently installed the Visual Studio 11 Developer Preview to try it out, and now my VS 2010 projects won\'t open. Instead, I get the following error message:

10条回答
  •  Happy的楠姐
    2020-12-07 14:34

    Ugh I finally found the answer for this, which incidentally didn't give me the same error message - I get:

    error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

    For some reason it worked fine with 32-bit builds, but not 64-bit builds.

    Anyway, the solution is to copy all the VCTargetPath* keys from HKLM\SOFTWARE\Wow6432Node\Microsoft\MSBuild ToolsVersions\14.0 to HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0. They were missing for me.

    Actually I only copied VCTargetsPath and VCTargestPath14 because copying is quite tedious. Seems to be sufficient for VC++ 2015.

提交回复
热议问题