János Tigyi
János Tigyi

Reputation: 397

Nuget.org in visual studio 2015 update 2 wont get nuget packages

I have a strange error. I can't download nuget packages with visual studio 2015 update 2.

I tried to ad nuget.org as package source but it returns 404 error

[nuget.org] The V2 feed at 'https://nuget.org/Search()?$filter=IsAbsoluteLatestVersion&searchTerm=''&targetFramework='uap10.0'&includePrerelease=true&$skip=0&$top=26' returned an unexpected status code '404 Not Found'.

[nuget.org] The V2 feed at 'https://nuget.org/odata/Search()?$filter=IsAbsoluteLatestVersion&searchTerm=''&targetFramework='uap10.0'&includePrerelease=true&$skip=0&$top=26' returned an unexpected status code '404 Not Found'.

[nuget.org] The V2 feed at 'https://nuget.org/odata/Search()?$filter=IsAbsoluteLatestVersion&searchTerm=''&targetFramework='uap10.0'&includePrerelease=true&$skip=0&$top=26' returned an unexpected status code '404 Not Found'.

I would like to install MVVM Light Toolkit, but I Can't cos it's available on nuget.org

Anyone know any solution?

Upvotes: 10

Views: 4567

Answers (3)

Uttam
Uttam

Reputation: 1

Based on what Sylvian mentioned, I was able to make my nuget packages work by adding the source as https://api.nuget.org/v3/index.json in Visual Studio 2017 Community edition for all my projects including .NET Core etc. All the nuget findbypackageid 404 erros are gone.

Upvotes: 0

TwitchBronBron
TwitchBronBron

Reputation: 3186

For some reason, I had to edit my machine-wide config before this would start working in Visual Studio 2015

https://learn.microsoft.com/en-us/nuget/consume-packages/configuring-nuget-behavior#config-file-locations-and-uses

Open the file at this path: %ProgramData%\NuGet\Config[\{IDE}[\{Version}[\{SKU}\]]]NuGet.Config

And use the feed that SRO suggested: https://api.nuget.org/v3/index.json

Here is the full path to my specific machine-config: `C:\ProgramData\NuGet\Config\VisualStudio\14.0\Microsoft.VisualStudio.config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="Microsoft and .NET"
         value="https://api.nuget.org/v3/index.json" />
  </packageSources>
</configuration>

Upvotes: 2

Sylvain Rodrigue
Sylvain Rodrigue

Reputation: 4994

Try this feed, it's the one I'm using :

https://api.nuget.org/v3/index.json

enter image description here

Upvotes: 18

Related Questions