JohnnyCrazy / SpotifyAPI-NET

:sound: A Client for the Spotify Web API, written in C#/.NET
http://johnnycrazy.github.io/SpotifyAPI-NET/
MIT License
1.52k stars 310 forks source link

Not able to install the packge via nuget - There are no versions available for the package #968

Closed SathyaBhat closed 7 months ago

SathyaBhat commented 7 months ago

HI,

I see that dotnet 8 support is mentioned in the previous release but I can't install it using nuget. Is this expected?

 dotnet add package SpotifyAPI.Web
  Determining projects to restore...
info : Adding PackageReference for package 'SpotifyAPI.Web' into project 'C:\code\spotify-last-fm-sync\spotify-last-fm-sync.csproj'.
error: There are no versions available for the package 'SpotifyAPI.Web'.
SathyaBhat commented 7 months ago

Found the solution via https://stackoverflow.com/a/54798770/92837

I finally fixed the issue by deleting the NuGet.Config file in C:\Users\\AppData\Roaming\NuGet folder then running dotnet restore

Running dotnet restore created a fresh config file on the folder which i noticed has a different packageSources value than the old one.

The old one had https://www.nuget.org/api/v2/ while the new one had https://api.nuget.org/v3/index.json