Package Manager Console Policy Message

Utveckling

NuGet Policy settings problem in Package Manager Console

I needed to update a NuGet package in Visual Studio using the Package Manager Console but the network policy settings were overriding my local client permissions. This is how to solve the issue.

The Package Manager in Visual Studio is great when updating or installing new NuGet packages. It may be found under this menu in Visual Studio: View / Other Windows / Package Manager Console.

I first got this error message:

Package Manager Console Policy Message

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 tried a lot of solutions on the net but this solution was the one that got me on going.

Start the register editor by typing regedit from the Windows Start-button. Open regedit in admin mode (right click and select Run as administrator).

Delete the registry key named ExecutionPolicy that is being pushed by the Group Policy object located at HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\PowerShell

Execution Policy Registry Key

Delete the Execution Policy Registry Key

Restart Visual Studio.

Now I´ve got a more pleasant message:

Each package is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Some packages may include dependencies which are governed by additional licenses. Follow the package source (feed) URL to determine any dependencies.

Package Manager Console Host Version 2.8.60610.756

Type ’get-help NuGet’ to see all available NuGet commands.

PM>

And could finally run my command:
PM> Update-Package Glass.Mapper.Sc -Version 4.1.1.66

By  -      

Kommentera

E-postadressen publiceras inte. Obligatoriska fält är märkta *