Visual Studio 2019 Developer PowerShell v16.9.4 无法运行

Visual Studio 2019 Developer PowerShell v16.9.4 not working

我有关于 Visual Studio 2019 Developer PowerShell v16.9.4.

的问题或疑问

我有 Visual Studio Professional 2019,版本 16.9.4。

当我右键单击我的解决方案并 select 在终端中打开 然后 Visual Studio 2019 Developer PowerShell v16.9.4 打开...但它不允许我 put/execute 任何命令子它。 我的印象是它没有完全加载或什么的...

相比之下,如果我打开 Visual Studio 2019 Developer Command Prompt,如下图所示: v16.9.4 我可以在其上执行命令。

这就是 PowerShell 发生的情况

注意:我知道有设置选项,但我还没有修改任何东西。

我是不是遗漏了什么,或者其他人可以为我指明正确的方向以使其发挥作用?

我已经解决或找到了解决方法。 在我最初的 post 中,我确实提到我知道有一个 设置选项 但我还没有在那里做任何事情......但是。

最后,我解决了朝那个方向发展的问题。 所以,以防其他人面临相同或相似的情况。

我的内置Developer PowerShell(在Visual studio内)是配置如下:

shell location: C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe
Arguments: -NoExit -Command "& { Import-Module $env:VSAPPIDDIR\..\Tools\Microsoft.VisualStudio.DevShell.dll}; Enter-VsDevShell -SkipAutomaticLocation -SetDefaultWindowTitle -InstallPath $env:VSAPPIDDIR\..\..\

因此,我创建了一个新的 Developer PowerShell 设置,名为:“Sebas PowerShell”(非常原始)并具有以下设置(更少的参数):

shell location: same location pointing to powershell.exe
Arguments: -NoExit 

像这样,它工作得很好。 所以,我猜它可能与 DevShell.dll 或其他参数有关。 无论如何,现在我可以在 Visual Studio

中使用 Developer PowerShell