Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nuget Package - feed (VSTS) :Exception 'System.AggregateException' thrown when trying to add source

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?

like image 801
Hussein Salman Avatar asked May 05 '16 15:05

Hussein Salman


People also ask

How do I force a NuGet package to Install?

Switch to the Browse tab, search for the package name, select it, then select Install). For all packages, delete the package folder, then run nuget install . For a single package, delete the package folder and use nuget install <id> to reinstall the same one.

How do I add NuGet package source to Visual Studio?

Set up Visual StudioIn Visual Studio, select Tools, and then select Options. Select NuGet Package Manager, and then select Package Sources. Enter the feed's Name and Source URL, and then select the green (+) sign to add a new package source. If you enabled upstream sources in your feed, clear the nuget.org checkbox.

Where are NuGet package sources stored?

The location of the default global packages folder. The default is %userprofile%\. nuget\packages (Windows) or ~/. nuget/packages (Mac/Linux).


4 Answers

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

like image 76
Eddie Chen - MSFT Avatar answered Oct 23 '22 12:10

Eddie Chen - MSFT


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

like image 40
marvelTracker Avatar answered Oct 23 '22 12:10

marvelTracker


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

like image 12
Maulik Parmar Avatar answered Oct 23 '22 13:10

Maulik Parmar


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.

like image 4
AgathoSAreS Avatar answered Oct 23 '22 13:10

AgathoSAreS