zhuangr
zhuangr

Reputation: 51

Visual Studio For Mac cannot run Powershell with Nuget Package Management extension

I was trying to use add-migration command within package management console in Visual Studio for Mac, version 8.4.8 (VS Mac). However, Package Management(PM) Console does not come with VS Mac. Cant find package manager console in visual studio for mac I followed the above link, and installed Powershell and NuGet Package Management Extensions version 0.21 . The PM console shows up in my VS Mac. But when I opened it, it started giving me error which I pasted below.

I can run PowerShell in mac terminal. But it does not work within 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.

Upvotes: 0

Views: 1639

Answers (1)

zhuangr
zhuangr

Reputation: 51

I uninstalled Visual Studio for Mac and all the resources and dependencies files following this guide. Just removing Visual Studio from the application folder was not enough.

After reinstalling Visual Studio, and then installing the NuGet Package Management Extension, my PM console shows up without any error.

Upvotes: 0

Related Questions