每次安装最后的VisualStudiosetup时,我最终都会下载MSBUILD 15.0而不是16或17
1-为什么我要问这个问题
我实际上是在尝试运行 npm install ,但我遇到以下错误:
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
我遵循以下堆栈答案中建议的内容
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]
href =“ https://stackoverflow.com/a/71892288/2721822”> Microsoft.cpp.default.props.cpp.default.props” 确实
。
> 尝试安装最新的Microsoft Visual Studio,我最终安装了 msbuild 15 。 我如何安装Visual Studio 2022版本17.2也使用MSBUILD 16或17进行发布。
我还尝试遵循我如何安装较新的MSBUILD版本?,仍然将MSBUILD卡在版本15上。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我们可以从官方文档 MSBUILD 17.0用Visual Studio 2022和.NET 6.0运送。
由于新版本号,我们还可以看到以下MSBUILD属性已更新。
您可以在工具&GT下使用开发人员命令提示中的命令“ msbuild -ver”检查该版本;这样的命令行。

您可以从
We can see from the offical documents that MSBuild 17.0 shipped with Visual Studio 2022 and .NET 6.0.
We can also see the following MSBuild properties have been updated due to the new version number.
You can check the version by use the command “msbuild -ver” in Developer Command Prompt under Tools > Command Line like this.

You can download Visual Studio 2022 from here. If you have any questions please let me know and I will reply promptly.