【问题标题】:Visual Studio For Mac cannot run Powershell with Nuget Package Management extensionVisual Studio For Mac 无法使用 Nuget 包管理扩展运行 Powershell
【发布时间】:2020-06-18 21:14:04
【问题描述】:

我试图在 Visual Studio for Mac 版本 8.4.8 (VS Mac) 的包管理控制台中使用 add-migration 命令。但是,包管理(PM)控制台不随 VS Mac 一起提供。 Cant find package manager console in visual studio for mac 我按照上面的链接,安装了 Powershell 和 NuGet 包管理扩展版本 0.21 。 PM 控制台出现在我的 VS Mac 中。但是当我打开它时,它开始给我错误,我粘贴在下面。

我可以在 mac 终端中运行 PowerShell。但它在 VS Mac 中不起作用

Disconnected from remote PowerShell host. Reason: Disposed: Reached end of stream.
Disconnected from remote PowerShell host. Reason: Disposed: Reached end of stream.
Unable to restart PowerShell host
Unable to restart PowerShell host
A task was canceled.
NuGet 5.3.0.3
Type 'get-help NuGet' for more information.

Unable to restart PowerShell host
PM> 
Unable to restart PowerShell host
PM> 
Unable to restart PowerShell host
PM> 
Unable to restart PowerShell host

'/Users/myname/.nuget/packages/microsoft.entityframeworkcore.tools/3.1.2/tools/init.ps1'

Executing script file '/Users/myname/.nuget/packages/microsoft.entityframeworkcore.tools/3.1.2/tools/init.ps1'...
Write fault on path /[Unknown]
Disconnected from remote PowerShell host. Reason: Disposed: Reached end of stream.

【问题讨论】:

  • 您能在 IDE 日志中找到任何错误吗(帮助 - 打开日志目录)?您列出的错误输出只是表明 PowerShell 主机控制台应用程序无法运行。

标签: macos powershell visual-studio-mac nuget-package-manager-console


【解决方案1】:

感谢大家的关注。

今天,我的 VS Mac 无法打开我之前的项目文件并显示此错误

Expected 1 export(s) with contract name MonoDevelop.TextEditor.CocoaTextViewImports but found 0 after applying applicable constraints.

我认为我对这个问题的一些调试过程导致了这个新问题。所以我决定重新安装我的VS。我卸载了 VS Mac,所有资源和依赖文件都遵循这个link

仅从应用程序文件夹中删除 VS Mac 是不够的。

安装 NuGet 包管理扩展后,我的 PM 控制台显示没有任何错误,新问题也消失了。

【讨论】:

    猜你喜欢
    • 2018-01-14
    • 2022-06-29
    • 2020-06-29
    • 2023-04-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多