首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >未找到导入的项目"D:\Microsoft.Cpp.Default.props“

未找到导入的项目"D:\Microsoft.Cpp.Default.props“
EN

Stack Overflow用户
提问于 2021-06-01 13:13:40
回答 1查看 2K关注 0票数 3

当我使用npm install安装node_modules时,我遇到了这个错误。

代码语言:javascript
复制
D:\react\...\node_modules\gulp-sass\node_modules\node-sass\build\src\libsass.vcxproj(20,3): error MSB4019: The imported project  
"D:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

我已经安装了Visual Studio构建工具。

MSBuild位置为c:\Program File (x86)\MSBuild

我在路径Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0的regedit上将VCTargetsPath设置为$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolsVersions\14.0@VCTargetsPath)

但是我不确定为什么要走D:\Microsoft.Cpp.Default.props的道路

我该如何解决这个问题?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-06-01 20:53:10

您必须检查该路径是否已在注册表中注册。Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\MSBuild\ToolsVersions\4.0

代码语言:javascript
复制
Name: VCTargetsPath
Type: REG_SZ
Value: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets

如果对您无效,请将路径添加到系统环境路径。

代码语言:javascript
复制
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets

希望能为你工作。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67783044

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档