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:
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
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