Search code examples
visual-studio-2015nugetmyget

Error with MyGet feed "Package 'PackageName' is not found"


I've started using MyGet to keep track of packages I reuse internally throughout different solutions.

Steps Taken:

  • Created the package using the NuGet Package Explorer.
  • Uploaded this package to the MyGet feed.
  • Connected to the MyGet feed from Visual Studio
  • First time installing the package from the MyGet feed works correctly.
  • Made updates to the package, re-generated the package using the NuGet Package Explorer
  • Uploaded the new package to the MyGet feed and verified that the version number updated to the proper version given to it when generating the package.
  • Back in Visual Studio, I now have the option to Upgrade to the latest version of my package.
  • Clicking Upgrade results in the below error in Visual Studio.

MyGet Package Error in VS

I have tried:

  • Uninstalling/reinstalling the package
  • Removing all references to this project from the .csproj file
  • Manually downloading the package from MyGet and replacing the package in the solution

Installing the new package on a different computer, does work fine. Installing the old version of the package (the first version installed on the computer) also works fine.

If there is any other information you may need, please let me know.

Thank you.


Solution

  • Did you increment the package version number on the second publish? If not, NuGet will cache it on your disk (which explains this works on another machine).

    Always ++ the version when publishing :-)

    Edit: Best update NuGet (https://dist.nuget.org/index.html) and if it persists, check with MyGet support.