Visual Studio 2017 Professional- Unable to find package at source
Solution 1
Assuming you are using Windows OS Have you initialised vs 2017 after installation or Have you updated your vs 2017?
- If not then please initialized it.
- Restart your PC.
- Open your project in vs 2017
-
Check your nuget package manager settings.
Name:nuget.org
Source:api.nuget.org/v3/index.json
Now, run nuget package manager from tools=>Nuget Package Manager=>Package Manager Console
and write your install-package command or run Manage nuget package manager for solution from tools=>Nuget Package Manager=>
Hope,it helps you.
Solution 2
I resolved this issue by adding nuget.org
which was missing in my package source.
Go to Tools>
Nuget
package manager>Package Sources>
Click Plus sign >
Name: nuget.org
Source : https://api.nuget.org/v3/index.json
Now your Visual studio will be connected to Internet and package will be downloaded successfully.
Solution 3
Your VS 2017 is probably using some kind of proxy setting which is preventing it from accessing the internet.
To check if VS can access internet try opening any web page from within VS Browser. If you cannot browse then my hunch is correct.
Solve the proxy issue and you should be fine.
Hope it helps.
Iswar
I am .Net Core Programmer with experience in Angular 7, SQL Server, Bootstrap framework and have a desire to learn
Updated on June 18, 2022Comments
-
Iswar almost 2 years
I was trying to add package through nuget package manager=> package manager console and from Manage Nuget packages from solution directly. I am trying to install
Newtonsoft.Json
from Package Manager Like thisInstall-Package Newtonsoft.Json
but unable to find from the source i.eName: nuget.org Source: https://api.nuget.org/v3/index.json
This gives me result like this:
PM> Install-Package Newtonsoft.Json Install-Package : Unable to find package 'Newtonsoft.Json' at source ''. At line:1 char:1 + Install-Package Newtonsoft.Json + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Install-Package], Exception + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand Time Elapsed: 00:01:30.2571879
I think that the
source
here is blank. May be because of that it is unable to load packages. I have tried to manage the package manager setting but not been able to connect. My package manager setting is like this:Despite of having good connection of internet I am not been able to install package. My questions are:
- How should I install package?
- What am I doing wrong to install package?
-
boop_the_snoot almost 7 yearsIs this visual studio 2017 Express Edition?
-
Iswar almost 7 yearsNo it is professional I am using.
-
Leo Liu almost 7 years@Iswar K Chettri, according to the error message, this issue seems caused by the network access the nuget.org. You can try access the url:api.nuget.org/v3/index.json from browser to check whether it can be accessed from browser directly, and could you find any package from NuGet Package Manager UI?
-
Iswar almost 7 yearsYes I have tried this one also but seems unreachable
-
Iswar almost 7 yearsit is accessing the web page from within the VS Browser. I have tried this url
https://msdn.microsoft.com/en-in/default.aspx
it works fine -
alexb over 6 yearsI've got the same problem. Doesn't seem to matter which package I try to install...get the same error with all. Running Win7x64. Also running VS2015, VS2013, VS2012 and VS2010. VS2017 is the only one I have the problem with, though. I've updated Nuget itself several times with no luck. :(
-
Dylan over 4 yearsInstalling VS 2019 on a machine that already had 2017 I encountered OPs problem. For whatever reason in "Tools|Options|NuGet Package Manager|Package Sources" there were a bunch of weird local sources listed. Disabling these and clicking update on the nuget.org one (unsure if this step necessary) fixed my problem.