visual-studio - 无法安装 microsoft.netcore.hostpath 2019

标签 visual-studio visual-studio-code visual-studio-2012 visual-studio-2015 visual-studio-2019

我正在尝试安装 Visual Studio 2019,但不幸的是每次我都会收到此错误

could not install Microsoft.NetCore.HostPath

这是相同的图像:

enter image description here

最佳答案

解决方案对我有用(没有其他帮助)

  1. 安装 PowerShell v7 ( https://aka.ms/pscore6 )
  2. 从 C:\Windows\SysWOW64\WindowsPowerShell\v1.0 备份原始 PowerShell v1
  3. 将“C:\Program Files\PowerShell\7”复制到 C:\Windows\SysWOW64\WindowsPowerShell\v1.0
  4. 将 pwsh.exe 重命名为 powershell.exe
  5. 现在 VS 安装程序正在使用 PowerShell v7,认为它是 v1,工作正常!

所以,我相信这是旧版本 PowerShell 中的错误

也许有更好的方法来模仿版本,我只是在为此损失了一天之后做了老式的残酷魔法

关于visual-studio - 无法安装 microsoft.netcore.hostpath 2019,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70461843/

相关文章:

haskell - 从 Windows 10 中完全删除 Stack

c++ - VS2012 : “Cannot find the resource compiler DLL. Please make sure the path is correct.”

c - 在 VS2012 Debug模式下找不到 fabs() (ANSI C)

c++ - 如何在自定义类中调用 "SetDlgItemText"?

visual-studio - 如何使用解决方案/项目/文件夹组织大型项目?

visual-studio - Visual Studio 插件跳转到测试类

c++ - 异常传播和 std::future

mysql - 如何在VS 2013中将MySQL表添加到对象关系设计器?

debugging - 在 vscode 中调试 Serverless 时未命中断点

markdown - VSCode 可以显示 Markdown 语法预览 Pane 吗?