Visual Studio 2022 的开发人员 PowerShell 已损坏

Visual Studio 2022 的开发人员 PowerShell 已损坏

尝试打开 Visual Studio 2022 的开发人员 PowerShell 时收到以下两条消息:

Windows 找不到“C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe”,请确保您输入的名称正确,然后重试

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe 文件或目录已损坏且无法读取

我对编程完全陌生,所以请以简单的逐步方式解释如何在 Visual Studio 中修复此错误。

已尝试重新安装 Visual Studio,但没有成功。

编辑:刚刚发现我可以从 VS 中打开 powershell,但在 Windows 10 中使用搜索来获取显示应用程序的列表时却无法打开。powershell 的应用程序图标不存在,尝试以管理员身份运行应用程序时会收到上述错误消息

答案1

如果您使用资源管理器转到 C:\Windows\SysWOW64\WindowsPowerShell\v1.0\,powershell 是否在此文件夹中?

如果您能找到 powershell.exe 的位置,我们就能更进一步找出问题所在。也许快捷方式将您带到了错误的位置?

也许这也能有帮助? https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.2

相关内容