Luke Puplett
Luke Puplett

Reputation: 45253

ASP.NET vNext - NuGet not prompting for credentials

In a Visual Studio 2015 Update 1, ASP.NET vNext project, the IDE cannot auto update the references via NuGet.

The error is due to a 407 from our proxy (as usual). But what's strange is that from the VS IDE package manager UI, we can browse the packages in the feed, it works, and it does sometimes prompt for credentials.

If we run Update-Package -Reinstall it fails to find anything to install!

Most machines in the team are fine, though this person is working on ASP.NET vNext, and when she opens an old skool MVC project its all fine, in-as-much as the Update-Package -Reinstall will run fine.

Here's the output from the Package Manager

Warning: FindPackagesById: System.Security.Principal An error occurred while sending the request.

GET https://www.nuget.org/api/v2/FindPackagesById()?id='System.Security.Principal' System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The remote server returned an error: (407) Proxy Authentication Required. at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)

What are we missing regarding NuGet, config and these new vNext projects/solutions??

Why doesn't it prompt for creds as the NuGet docs say its supposed to?

Upvotes: 2

Views: 280

Answers (1)

Kundan
Kundan

Reputation: 1415

Check if you have any old credentials stored in windows Credential Manager.

VS refers to the available credentials and try to connect to nuget proxy. If the stored credentials are incorrect then it just throws error rather than prompting for new credentials

Try removing those credentials and try again in VS; It should prompt again.

Upvotes: 0

Related Questions