44
votes

I have created a new feed with in Package Release hub (VSTS), installed the credentials, then added the package source.

Now, I am using Visual Studio 2015 to install Micrososft.Aspnet.mvc to a project, however it gives the following error:

Exception 'System.AggregateException' thrown when trying to add source
'https://mysite.pkgs.visualstudio.com/DefaultCollection/_packaging/MyLogUtils/nuget/v3/index.json'.
Please verify all your online package sources are available.    

I need to install NuGet packages normally, so I removed the feed from VSTS. However, the problem persists. How can this problem be resolved?

12
What's the detailed Visual Studio version you use? Nuget Package Manager works with VS2015 Update1 and later. Does it still occur if you delete the new added source from your PC? And can you share the detailed steps to reproduce this issue?Eddie Chen - MSFT

12 Answers

61
votes

I met this issue today and fix it by following:

If you have delete the feed from VSTS, then you need to delete it from VS\Tools\Options\Nuget Package Manager\Package Sources: enter image description here

If you didn't delete the feed in VSTS and want to use it, sign in with your VSTS team project account from VS upper right corner and restart VS:

enter image description here

25
votes

This is may be an addition to the actual answer. I had to disable the check boxes as shown in below image to get the issue resolved. I think it might help to someone.

enter image description here

11
votes

I had the same issue and I fixed issue by disabling my custom NuGet servers. Go to Tools->Options->Nuget Package Manager and disable your custom NuGet servers

enter image description here

3
votes

Since this is the first Page I hit with my Problem:

If you get the error for nuget.org site, increase Version number:

https://api.nuget.org/v3/index.json -> https://api.nuget.org/v4/index.json

under Tools->Options->Nuget Package Manager (see Image from @Eddie-MSFT)

V3 doesn't seem to work since today.

0
votes

I also encountered that issue. I solved it by manually saving the index.json file and adding a local packaged source.

enter image description here

0
votes

I had same issue, I resolved it by disabling its custom nuget server.

0
votes

This exception might get when NuGet.Config file is readonly, for me unchecking the reaonly property of that file worked, generally, Nuget.config file exists in your project under .nuget folder.

File path project dir/.nuget/NuGet.Config

0
votes

You have to ensure all your configured package source servers are available. Otherwise simply Go to Tools->Options->Nuget Package Manager and disable your custom NuGet servers.

0
votes

One of the following might solve your problem.

  1. Check and uncheck the package sources and click on update button, restart visual studio.
  2. Uncheck all the other package source and only keep the one from nuget.org and click on update button, restart visual studio.

enter image description here

Once your package is install redo the changes as before.

0
votes
'System.AggregateException' thrown when trying to add source 'https://devops.MyCompany.com/MC/_packaging/SharedFunctionalist/nuget/v3/index.json'. Please verify all your online package sources are available. One or more errors occurred.


Unable to load the service index for source https://devops.MyCompany.com/MC/_packaging/SharedFunctionalist/nuget/v3/index.json. Response status code does not indicate success: 401 (Unauthorized).
    

I got the same issue today.If you have noticed that It may asked you to enter DevOps credentials.That means it's request you to login your DevOps account.

There are two options for this type issue

1.Login with DevOps account(your Team Account) with your credentials.Then you can Install Nuget packages as usual.

2.Otherwise you have to delete existing package package source(which one is shared with team)by following below steps.

`Open Visual Studio ->Tools->Options->Nuget Package Manager-> Package Sources ->select that shared package Source and Delete it

see this image

0
votes

Go to Tools->Options->Nuget Package Manager->Package Sources and uncheck the online NuGet Source named nuget.org https://api.nuget.org/v3/index.json. Also make sure your offline source is checked

0
votes

I had the same problem. I resolved it by removing the checkmark from Tools/Options/Nuget Package Manager/Package Sources.