macos - Visual Studio For Mac 无法使用 Nuget 包管理扩展运行 Powershell
问题描述
我试图在 Visual Studio for Mac 版本 8.4.8(VS Mac)的包管理控制台中使用 add-migration 命令。但是,包管理(PM)控制台不随 VS Mac 一起提供。 在 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.
解决方案
感谢大家的关注。
今天我的VS Mac无法打开我之前的项目文件并显示这个错误
Expected 1 export(s) with contract name MonoDevelop.TextEditor.CocoaTextViewImports but found 0 after applying applicable constraints.
我认为我对这个问题的一些调试过程导致了这个新问题。所以我决定重新安装我的VS。我卸载了 VS Mac,所有资源和依赖文件都按照这个链接
仅从应用程序文件夹中删除 VS Mac 是不够的。
安装 NuGet 包管理扩展后,我的 PM 控制台显示没有任何错误,新问题也消失了。
推荐阅读
- r - 如何使用 tidyr::unite 函数删除 NA?
- reactjs - 网格之间的额外(不需要的)空间
- reactjs - ReactJS - 为什么我的嵌套元素没有呈现?
- javascript - POST 使用 php 将附加 javascript 中的值提交到 mysql
- php - php while循环只显示数据库中的最后一行
- amazon-web-services - Cloudflare 使用 S3 后端时如何设置默认对象?
- php - php重定向到外部链接时禁止403
- javascript - 使用 fetch api 发布到服务器
- module - 与 add_library 一起使用的 CMake Fortran 模块目录
- python - json.decoder.JSONDecodeError:额外数据:第 2 行第 1 列(字符 5357)