Thursday, July 3, 2025

Unable to find packages "PackageName". No packages exist with this id in source(s): C:\Program Files\dotnet\library-packs, Microsoft Visual Studio Offline Packages

 Hello Everyone,

Sometimes, when you clone your code to a new location and try to run it, you might encounter an error like:

Unable to find package "PackageName". No packages exist with this ID in source(s): C:\Program Files\dotnet\library-packs, Microsoft Visual Studio Offline Packages

Don’t worry — this is a common issue, and the solution is simple. Just follow the steps below to resolve it.

✅ Here's how to fix it:

1. Add nuget.org as a Package Source

Visual Studio might not be configured to look at the official NuGet repository. To fix this:

  1. Go to Tools > Options.
  2. Navigate to NuGet Package Manager > Package Sources.
  3. Click the "+" button to add a new source.
  4. Set:
    • Namenuget.org
    • Sourcehttps://api.nuget.org/v3/index.json
  5. Click Update or OK to save.

Make sure nuget.org is checked and at the top of the list 

your setting look like as below screen.

Rebuild your solution ! Hope it help you 
Thank you!





No comments:

Post a Comment