Type initializer for "Nuget.Proxy Cache" throws an exception

I get an error The type initializer for "Nuget.Proxy Cache" threw an exception when trying to connect to the Nuget source directory. I am behind the corporate network, but I doubt that the problem is with the connection.

Any ideas?

+6
source share
1 answer

I have the same problem. I used the following powershell command in the package manager console to help me find the source:

try { update-package nunit} catch{ $error| Format-List * -Force $Exception = $error[0].Exception for ($i = 0; $Exception; $i++, ($Exception = $Exception.InnerException)) { "$i" * 80 $Exception |Format-List * -Force } } 

In my case, the main error is:

System.DllNotFoundException: Unable to load DLL 'rasapi32.dll': access denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Attaching a debugger and then looking at the NuGet source code that it throws when NuGet tries to determine if the solution is in the source code. The error is caused by the EnvDTE interface, which is opened by the visual studio.

I will update this if I really solve the problem, but hopefully this is the beginning.

+1
source

Source: https://habr.com/ru/post/947257/


All Articles