The imported project "D:\Microsoft.Cpp.Default.props" was not found

Viewed 4929

When I install node_modules using npm install, I face this error.

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.

I've installed Visual Studio Build Tools.

MSBuild position is c:\Program File (x86)\MSBuild

And I set VCTargetsPath as $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSBuild\ToolsVersions\14.0@VCTargetsPath) on regedit on path Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0

But I am not sure why the path to be D:\Microsoft.Cpp.Default.props

How can I solve this problem?

1 Answers

You have to check if the path registered on the registry. [Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\MSBuild\ToolsVersions\4.0]

Name: VCTargetsPath
Type: REG_SZ
Value: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets

If it doesn't work for you, add a path to the system environment path.

C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\VC\VCTargets

Hope to work for you.

Related