NuGet Package Manager: "No packages found" even though the package exists
As of VS2015 Update 2 the default and only feed installed is MS-Curated "Microsoft and .NET", https://www.nuget.org/api/v2/curated-feeds/microsoftdotnet/
This feed is missing a LOT of commonly used packages.
You can resolve this by simply adding the "normal" NuGet feed with all packages:
- Open Visual Studio 2015 as admin
- Tools > Options
- NuGet Package Manager > Package Sources
Click the green "add" icon, and add the following feed:
NuGet: https://api.nuget.org/v3/index.json
In my case I was looking for a prerelease and forgot to check Include prerelease
Another reason people may end up seeing "No package found" is that the UI defaults to "Installed" packages. Simply switch to the "Browse" tab, instead of the "Installed" tab.
Here are the troubleshooting steps I would take when looking into this issue.
- Visual Studio Settings
- Make sure you are in the BROWSE section.
- Click on the Package Source drop down to the right.
- Make sure nuget.org is listed.
- If nuget.org is not listed, add it.
- Open Tools > Options (Options window will open)
- Locate NuGet Package Manager > Package Sources
- Under available sources, click the + icon.
- Enter NuGet.org as the package name
- Enter https://api.nuget.org/v3/index.json as the package source.
- Click the OK button to save changes.
- If nuget.org is not listed, add it.
- **IMPORTANT** Choose ALL as your package source to search all sources.
- Make sure nuget.org is listed.
Connectivity & DNS
- Make sure internet is connected
- Open CMD
- ping 8.8.8.8
- If this does not respond your internet is not connected
- ping api.nuget.org
- If this does not resolve to an IP, then you have a DNS issue.
- nslookup api.nuget.org 8.8.8.8
- This should list the same IP address as the ping (along with some other info), If it does not then you may have a DNS issue (some local ISP DNS servers are not very good). Try changing your internet connection's DNS server to 8.8.8.8 and trying again.
- Make sure internet is connected
Proxy Issue
- Do you have Fiddler open? This can interfere with your connection to the nuget repository. Try shutting it down.
- Did you set all .NET to run through a proxy? This is a common step taken in troubleshooting if you need to see all requests coming in.
- Open C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config
- Remove or comment out the proxy configuration
Proxy Config Section
<system.net>
<defaultProxy enabled = "true" useDefaultCredentials = "true">
<proxy autoDetect="false" bypassonlocal="false"
proxyaddress="http://127.0.0.1:8888" usesystemdefault="false" />
</defaultProxy>
</system.net>