NPM包没有在Windows 8.1中建设 - 失败与以下错误,节点程序包不能在Windows 8.1 - 缺少Microsoft.Cpp.Default.props
error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
我曾尝试以下,
- 将环境变量
VCTargetsPath
设置为C:\Program Files (x86)\MSBuild\12.0\
(错误相应地发生变化,但2012构建工具没有Microsoft.Cpp.Default.props
)。 - 安装根据this answer
- 完全去除2010 VisualStudio的一个的VisualStudio 2010环境(卸载,然后安装在正确的顺序),并尝试了的VisualStudio 2012来代替,这要根据
Node-gyp
wiki - 添加注册表项,根据this answer工作
- 使用Windows 7.1 SDK命令提示根据this answer
- 试图运行NPM之前设置
VisualStudioVersion
根据this answer 试图
- 试图传递
--msvs_version=2012
根据this answer
无上述的工作过NPM。
我已经花了很多年了。有没有人有一个明确的答案是有效的?
它位于C:\ Program Files(x 86)\ MSBuild \ Microsoft.Cpp \ v4.0 \ V110目录。由VS2012安装程序放在那里。 VCTargetsPath需要指向那里。 –
我也试过这个,它实际上需要没有'V11.0'的路径,但它仍然没有工作... – Brendan
得到了类似的东西,但在Windows 7上使用VS 2013。为了解决这个问题,我使用了“开发者命令提示符VS2013”运行'npm install'。 – yoneal