1- Why I am Asking The question
I am actually trying to run npm install but I am getting the following error:
npm install error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct
I followed what was suggested in the following stack answer Microsoft.Cpp.Default.props" was not found. The error disapeared indeed, but in return I got a new error.
C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Microsoft\VC\v170\Microsoft.Cpp.props(41,5): error MSB4186: Invalid static method invocation syntax: "[Microsoft.Build.Utilities.ToolLocationHelper]::FindRootFolderWhereAllFilesExist($(_VCTargetsPathFolders), $(_RelativeToolsetFiles))". Method 'Microso
ft.Build.Utilities.ToolLocationHelper.FindRootFolderWhereAllFilesExist' not found. Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(`a`, `b`)). [C:\Users\hdaher\workspace\ahp-administration-portal-dashboard\node_modules\deasync\build\deasync.vcxproj]
Based on FindRootFolderWhereAll. FindRootFolderWhereAll
exists in MSBuild 16,17 and not in MSBuild 15
2- Question
Every time I try to install the latest Microsoft Visual Studio, I end up install MsBuild 15. How can I install Visual Studio 2022 version 17.2 Release with also Msbuild 16 or 17.
I also tried to follow what was suggested in How can I install a newer MSBuild version? and still Msbuild is stuck at version 15.