Unable to find package Swashbuckle.AspNetCore. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages

Viewed 3472

I am struggling with a project I just created on Visual Studio 2019. It's a .net C# project. When I launch the project I get this error :

"Unable to find package Swashbuckle.AspNetCore. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages"

I have tried to install the package but it doesn't work. And I have the package already installed as you can see here :

enter image description here

What do you think I should do ?

3 Answers

I had the exact same issue. You need to change your package sources as shown in the image. => Tools >> NuGet Package Manager >> package sources then click at "+" and add : name: nuget.org. source: http://api.nuget.org/v3/index.json

enter image description here

It's true. Swashbuckle.AspNetCore does not exist in the Offline Packages

So search for a replaceable package that covers your needs or you can change the Package source to e.g All or whatever source you prefer

enter image description here

UPDATE

adding the package to your Offline Packages will solve it also.

  • Download package Swashbuckle.AspNetCore

  • Update the Offline Packages

    => Tools >> NuGet Package Manager >> Package Manager Settings.

    => Packages Sources tap > select the Microsoft Visual Studio Offline Packages => set the path => add the downloaded package.

    => click update.

And you can check or update the Offline Packages path. Windows

Go to

  • C:\Program Files (x86)\NuGet\Config
  • in the Microsoft.VisualStudio.Offline.config file
  • key `Microsoft Visual Studio Offline Packages'
Related