Wednesday, April 3, 2019

NuGet falsely stating package missing from private feed.

Hello! Recently I decided to try and move many of my library projects to Azure Devops and hook them up with CI, pushing NuGet packages for each of them to a private feed. This works just fine for project built against .NET Standard 2.0, but is giving me some issues with packages built using .NET Framework 4.7.2.

When I build a .NET Framework library, update the assembly version, and publish it to Azure, the build and push to my private NuGet feed works just fine. I can see the package out there in my Artifacts and it's the correct (new) version and everything. I can even download it and it's all fine and well.

The problem seems to be in Visual Studio. I have a project which references this library through NuGet. When I update and push the library to Azure, after the build completes I can see the updated version is available through NuGet. But when I attempt to update to the latest version, NuGet states the package doesn't exist.

My build process is pretty simple:

  • Use NuGet 4.4.1
  • NuGet restore
  • Build solution **\*.sln
  • Copy Files to: $(build.artifactstagingdirectory)
  • NuGet pack
  • NuGet push

The odd part is, if I clear my NuGet cache or restart VS, I can update to the latest NuGet package just fine. So I think it may have to do with caching... but I don't know why the problem seems to be related only to NuGet packages created from .NET Framework assemblies, when .NET Standard and .NET Core assemblies have no issue :(

NuGet falsely stating package missing from private feed. Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team