52

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?

Community
  • 1
  • 1
Hussein Salman
  • 7,806
  • 15
  • 60
  • 98
  • 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 May 06 '16 at 05:26
  • A reference for you: https://github.com/NuGet/Home/issues/2598 – Eddie Chen - MSFT May 06 '16 at 06:16

13 Answers13

71

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

Eddie Chen - MSFT
  • 29,708
  • 2
  • 46
  • 60
27

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

marvelTracker
  • 4,691
  • 3
  • 37
  • 49
  • I had a custom NuGet package source and was getting the timeout error. Per this answer, I disabled the custom source, closed this dialog, refreshed the list of packages, then re-opened the package sources dialog and re-enabled my package source. Then, after refreshing my packages, installation of custom NuGet packages was again possible. – CJBS Mar 27 '18 at 22:46
16

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

Maulik Parmar
  • 857
  • 10
  • 15
  • This helped me. I had an out dated package sources in my package sources that didn't exist anymore. Even though I was trying to update a package from a different source it seemed to still fail because it was presumably trying to connect to one of the old non-existing sources. Thanks! – Dan Leksell Jan 03 '18 at 17:53
5

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.

AgathoSAreS
  • 378
  • 3
  • 7
0

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

Rod Kimble
  • 1,302
  • 3
  • 18
  • 44
0

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

Freggar
  • 1,049
  • 1
  • 11
  • 24
0

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

Gajendra
  • 1,291
  • 1
  • 19
  • 32
0

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.

Meghnath Das
  • 145
  • 1
  • 6
0

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.

Sunny
  • 2,183
  • 1
  • 17
  • 13
0
'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

Community
  • 1
  • 1
AHAMED AAQIB
  • 336
  • 4
  • 12
0

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

Techie Boy
  • 139
  • 1
  • 12
0

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

Mohammad
  • 1
  • 1
0

For me the package provoking the error was not showing up in the list of NuGet Sources (is it a bug?).

I had to go through the CLI (terminal) and enter

nuget sources

to get the list of Nuget sources.

Once the source causing the issue was listed I could remove it (you can also disable it)

nuget sources Remove -Name "source"

Documentation here

After that, restart Visual Studio

Eli
  • 414
  • 5
  • 10