The packages in my project.json
uses the node package manager
. I add a new package via nuget
to my Visual Studio 2015
ASP.NET 5
Beta 8 project.
When I'm on my home internet I can get download packages. However when I'm at the office I get the following error in my console if I add a new package:
PATH=.\node_modules.bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External;%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\git C:\Users\USERNAME.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta8\bin\dnx.exe "C:\Users\USERNAME.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta8\bin\lib\Microsoft.Dnx.Tooling\Microsoft.Dnx.Tooling.dll" restore "C:\PROJFOLDER\PROJNAME" -f "C:\Program Files (x86)\Microsoft Web Tools\DNU" Microsoft .NET Development Utility Clr-x86-1.0.0-beta8-15858
GET https://www.nuget.org/api/v2/FindPackagesById()?id='AutoMapper' Error: FindPackagesById: AutoMapper An error occurred while sending the request.
In Visual Studio 2015 Solution Explorer:
I get:
Package restore failed
If I use nuget
in a classic class library that doesn't use npm
then I am able to download the same packages, so the issue seem to limited to npm
On researching the error it is listed as an issue on GitHub. A workaround listed on the issue is to set a Windows environmental variables to my corporate proxy.
However I don't have proxy settings set in Internet Explorer.
My questions:
How do I determine the proxy I am using?
Is there an alternative way I can get it to work other than setting the environment variables. I tried the dnx.config workaround but it didn't work.
I use the laptop both at work and home. Is their a solution where I don't have to change settings between office and home?