Search code examples
c#visual-studionugetnuget-package-restore

Nuget Package "Not available in this source"


I'm trying to get the project started. One of the Nuget packages says "Not available in this source."

It's not a third-party package, but has the name: MyCompanyName.ProjectName.Debug

When I click Restore I get the following error:

An error occurred while trying to restore packages: Unable to find version '1.2.3' of package 'MyCompanyName.ProjectName.Debug'.

C:/Program Files (x86)\Microsoft SDKs\NuGetPackages: Package 'MyCompanyName.ProjectName.Debug.1.2.3' is not found on source 'C:\Program Files (x86)\Microsoft SDKs\NuGetPackages'. https://api.nuget.org/v3/index.json: Package 'MyCompanyName.ProjectName.Debug.1.2.3' is not found on source 'https://api.nuget.org/v3/index.json'.

One tip I found was to select "Restore All" from a local NuGet repository, but I'm not able to proceed afterwards.

Any help would be appreciated.

Thanks.


Solution

  • It sounds like your company has an internal NuGet feed where the package is published, instead of the public NuGet.org feed. You should ask your coworkers for the feed URL and add it to your configuration with e.g. nuget sources add.