Reputation: 4776
Package manager console crash in visual studio 2015 enterprise just after start with error:
Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defined at a more specific scope. Due to the override, your shell will retain its current effective execution policy of RemoteSigned. Type "Get-ExecutionPolicy -List" to view your execution policy settings. For more information please see "Get-Help Set-ExecutionPolicy".
I have tryied a lot of things like like setting execution policy in power shell to remoteSigned but nothing helped, nuget still don't work.
Any one have the same issue? Thanks for any advance.
Upvotes: 20
Views: 8990
Reputation: 41
I get the following error in VS 2013 under Tools\Nuget package Manager\ Package Manager console....
Issue:Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defined at a more specific scope. Due to the override, your shell will retain its current effective execution policy of Unrestricted. Type "Get-ExecutionPolicy -List" to view your execution policy settings. For more information please see "Get-Help Set-ExecutionPolicy
I uninstalled the Nuget Package manager using Tools\Extension and Updates uninstalled the Nuget Package Manager.
Reinstalled the package manager from below location to solve the issue.
https://marketplace.visualstudio.com/items?itemName=NuGetTeam.NuGetPackageManagerforVisualStudio2013
Upvotes: 0
Reputation: 463
After a completely clean install of Visual Studio Professional 2015 from the MSDN Website, I ran VS2015 as Administrator, opened up the Package Manager Console from Tools -> NuGet Package Manager... -> Package Manager Console
and I received this error:
Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defined at a more specific scope. Due to the override, your shell will retain its current effective execution policy of Unrestricted. Type "Get-ExecutionPolicy -List" to view your execution policy settings. For more information please see "Get-Help Set-ExecutionPolicy
By following the above steps to:
Use Tools -> Extensions and Updates... to uninstall NuGet Package Manager for Visual Studio 2015.
Restart Visual Studio.
Use Tools -> Extensions and Updates... to re-install NuGet Package Manager for Visual Studio 2015.
Restart Visual Studio.
Now when I open up the Package Manager Console, Powershell loads correctly and every thing is good. Hopefully this helps without having to override or set the execution policy.
Upvotes: 9
Reputation: 4776
Microsoft has published a hotfix for that issue, here is information how to apply it:
A hotfix is now available to install. Please grab the install from one of these locations appropriately:
2.8.7 for VS 2013: https://github.com/NuGet/Home/releases/download/2.8.7/NuGet.Tools.vsix
3.1.1 for VS 2015: https://github.com/NuGet/Home/releases/download/3.1.1/NuGet.Tools.vsix
NuGet will publish these to the Visual Studio gallery next week.
For more information visit this page: https://connect.microsoft.com/VisualStudio/feedback/details/1572078/nuget-crash-in-visual-studio-2015-enterprise
Upvotes: 34
Reputation: 453
I had the same issue and found solution that worked for me: set execution policy to "Undefined" in all scopes (Remove registry key for Machine and User scopes if they are set by domain policy) and then restart VS and open Package Manager Console.
Edit: path to key I deleted:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell
Key: ExecutionPolicy
This command line can be used to automate the process (run as admin), until issue is fixed:
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell /v ExecutionPolicy /f
Upvotes: 14