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

后端 未结 8 1967
有刺的猬
有刺的猬 2020-12-04 19:19

NPM packages are not building on Windows 8.1 - failing with following error,

error MSB4019: The imported project \"C:\\Microsoft.Cpp.Default.props\" was not fo

相关标签:
8条回答
  • 2020-12-04 19:31

    Finally Microsoft is providing much better solution to VS.

    0 讨论(0)
  • 2020-12-04 19:31

    A quick note for people who installed:

    1. Visual Studio 2012 (Express)

    2. MSBuild 2012

    with the issue of:

    1. MSBuild loads Microsoft.Cpp.Default.props

    2. MSBuild cannot load Microsoft.Cpp.props

    The solution is here: set parameter of MSBuild: /property:VCTargetsPath="C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110"

    0 讨论(0)
  • 2020-12-04 19:41

    The quick fix for me was this:

    set VCTargetsPath=C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120
    npm install
    
    0 讨论(0)
  • 2020-12-04 19:43

    This is the same issue as described here

    NPM native builds with only Visual Studio 2013 installed

    If you have a version of VS2013 installed set this environment variable before running the npm command:

    set GYP_MSVS_VERSION=2013
    

    or for VS2012

    set GYP_MSVS_VERSION=2012 
    

    background reading: https://github.com/Automattic/socket.io/issues/1151

    0 讨论(0)
  • 2020-12-04 19:44

    Setting the following fixed the problem for me

    /property:VCTargetsPath="C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120
    

    As mentioned on this forum

    0 讨论(0)
  • 2020-12-04 19:45

    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.

    0 讨论(0)
提交回复
热议问题