0
votes

My internet is broken and I'm trying to install local NuGet package in one of my projects and got exception message:

...thrown when trying to add source "https://api.nuget.org/v3/index.json". Please verify all your online package sources are available..

This is package of my other projects which has dependencies on some other packages form nuget.org but if all installed online packages are stored in local "../Solution/packages" folder, why I can't install my package?

2
Hi Pawcio, please create a new folder outside the current solution folder and copy this package and those packages that you downloaded from the nuget.org into this new folder, go to Tools-Options-NuGet Package Manager-Package Sources, click '+' icon to add a new package feed with the folder location that you just created, then test this issue again.Sara Liu - MSFT
that didn't worked but thank youPawcio

2 Answers

2
votes

In Visual Studio, goto Tools > Options > NuGet Package Manager > Package Sources and add a new package feed pointing to the absolute path of your Solutions/packages folder and give it a name.

Now, considering you have your solution open in Visual Studio with the project(s) you need to add the package reference(s) to, right click the solution and click Manage Packages for Solution, make sure you select the right Package source (dropdown list right corner) and install the package you need.

0
votes

All attempts to install target package directly ended with exception quoted in the question but I managed to install all referenced packages manually, on by one, and found out that I didn't exported one of my updated projects to local NuGet package. I'm not sure if that was the problem but now I have all needed packages installed.