Node Packages Not Building on Windows 8.1 - Missing Microsoft.Cpp.Default.Props

Node packages not building on Windows 8.1 - Missing Microsoft.Cpp.Default.props

So it is 2.47am - figured it out.

Although the node-gyp site seems to suggest using Visual Studio 2010 or 2012, instead for Windows 8.1, install Visual Studio Express 2013 for Windows Desktop as discussed in this issue.

npm install -g karma error MSB4019: The imported project C:\Microsoft.Cpp.Default.props was not found

I had the same issue with other modules after installing VS Express 2013 for web alongside VS Express 2012 for Windows.
The solution was to install VS 2013 for Windows and use the switch

npm install --msvs_version=2013

Why does MSBuild look in C:\ for Microsoft.Cpp.Default.props instead of c:\Program Files (x86)\MSBuild? ( error MSB4019)

For those who didn't follow the MS proscribed order (see Xv's answer) you can still fix the problem.

MSBuild uses the VCTargetsPath to locate default cpp properties but cannot because the registry lacks this String Value.

Check for the String Value

  • Launch regedit
  • Navigator to HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0
  • Inspect VCTargetsPath key. The value should = "$(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\"

To fix

  • Launch regedit Navigator to HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0
  • Add String Value VCTargetsPath
  • Set Value to "$(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\"

Note: HKLM stands for HKEY_LOCAL_MACHINE.



Related Topics



Leave a reply



Submit