Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install any NuGet Package if at least one Source is not available #2978

Closed
GeorgeVovos opened this issue Jun 15, 2016 · 11 comments
Closed

Comments

@GeorgeVovos
Copy link

Initially posted here:
http://stackoverflow.com/questions/37830799/cant-install-any-nuget-package-if-at-least-one-source-is-not-available

I've added a custom NuGet package source.
If that source if not available I cannot install any package (for example EntityFramework)

Attempting to gather dependency information for package 'EntityFramework.6.1.3' with respect to project 'ConsoleApplication9', targeting '.NETFramework,Version=v4.5.2'

Exception'System.AggregateException' thrown when trying to add source 'http://XXX/FeedService.svc/'.

Please verify all your online package sources are available.

I'm using:
VS2015 Enterprize Update 2 with NuGet 3.4.4.13.21
It seems to be working fine with
VS2013 Premium Update 5 with NuGet 2.8.60723.765

@GeorgeVovos
Copy link
Author

This is by design. Since we support searching across multiple sources for the packages that you need, we need to be able to reach all sources and get the package results before restoring these packages, to be deterministic and consistent in the way we do restore.

However, we understand that some users go into offline/online modes and we are investing in building a feature set that will enable you to temporarily disable some sources while you are working offline. In the meantime you can look into creating a custom nuget.config that does not contain the offending source and using that to restore when you are in the offline mode.

@mmarjano
Copy link

It's not just a matter of going offline. I've got my company nuget server configured, and it's not publicly available. In order for nuget package restore to work, I need to be connected to the company VPN even if I'm not attempting to use any of packages hosted there (i.e. doing something unrelated to my employer, like open source development). This is very inconvenient...

@ADThomsen
Copy link

To add to this it isn't just restore that gives problems as it seems @GeorgeVovos thinks. You can't install packages either. So I can't sit at home, disconnected from my employers VPN, and start a new project and then start adding NuGet packages.

@larrybud2004
Copy link

You can get around this, at least in VS2017.

  1. Go to TOOLS
  2. NuGet Package Manager
  3. Package Manager Settings
  4. Under Package Sources, Uncheck the one(s) which is unavailable
  5. Go and install your package from the other available source

Not sure why Nuget just doesn't ignore the unavailable sources when searching/installing. Seems like it would be a simple thing to accomplish.

@PierreDelestre
Copy link

It worked for me, thank you very much

@KarlDirck
Copy link

Is there any update on this "feature"? This is still an issue in VS 2019 Enterprise.

@ihorbond
Copy link

@larrybud2004 thanks!

@rrelyea
Copy link
Contributor

rrelyea commented Apr 24, 2020

@anangaur @aortiz-msft - not sure if we can dupe this to another issue tracking handling unavailable sources better that we do today?

@anangaur
Copy link
Member

Dupe of the following issue:
NuGet Restore/Update does not work when unrequired package sources are unavailable #6373

@sharprs83
Copy link

Dupe of the following issue:
NuGet Restore/Update does not work when unrequired package sources are unavailable #6373

I woulda said 6373 is a dupe of this. I'd not encountered this issue before but it's a ridiculous restriction. If the package manager UI is set to only look at nuget.org, then it shouldn't even be checking for anything at all on other sources.

@amirrazzaqi
Copy link

You can get around this, at least in VS2017.

  1. Go to TOOLS
  2. NuGet Package Manager
  3. Package Manager Settings
  4. Under Package Sources, Uncheck the one(s) which is unavailable
  5. Go and install your package from the other available source

Not sure why Nuget just doesn't ignore the unavailable sources when searching/installing. Seems like it would be a simple thing to accomplish.

Very Gooooood

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests