In Azure DevOps, I currently have two NuGet feeds set up: a Primary feed and a Prerelease feed. The Prerelease feed is set up as a upstream source of the Primary feed where I have preview versions of packages automatically pushed frequently and kept separate from what we consider final versions in the Primary feed.
I've followed the documentation to set up upstream sources and it works but only for the first version of a package. So if package Foo.1.0.0-preview01 gets added to the Prerelease feed and installed via Visual Studio, it gets cached into the Primary feed and the package gets restored properly and everything.
But once I create a Foo.1.0.0-preview02 in the Prerelease feed and repeat the steps above (install via VS), the new version doesn't get cached into the Primary feed like the first one. I've tried over the course of several days and with different packages and the behavior has been consistent.
Any help is appreciated.
Edit: More info as request.
The exact steps I took are as follows:
- Configure a Primary feed and a Prerelease feed as Primary's upstream source.
- Azure DevOps creates and pushes a package Foo.1.0.0-preview.20200207.1 to the Prerelease feed through some automated process. It is visible in Prerelease but not Primary.
- In Visual Studio, have both feeds as package sources. This was done because of the workaround suggested at end of this StackOverflow answer: https://stackoverflow.com/a/56196158/4183606
- Install Foo.1.0.0-preview.20200207.1 with either the copied command from Azure DevOps or using the NuGet package manager UI in Visual Studio.
- See that Foo.1.0.0-preview.20200207.1 is now visible in Primary feed.
- Make some changes to Foo package and Azure DevOps creates and pushes a new one Foo.1.0.0-preview.20200115.2 to the Prerelease feed.
- Install Foo.1.0.0-preview.20200207.2 using the NuGet package manager in Visual Studio.
- Foo.1.0.0-preview.20200207.2 does not appear in Primary feed.
Foo.1.0.1-preview
instead ofFoo.1.0.0-preview02
? Are you install the package from Primary feed in the Visual Studio? Would you please share us some more steps and images to reproduce this issue. Thanks. – Leo Liu-MSFTFoo.1.0.0-preview.20200207.2
using the NuGet package manager in Visual Studio, it get the package directly from the Prerelease feed instead of the Primary feed. So, it not cache in the Primary feed. How about install that package only enable Primary feed in Visual Studio? – Leo Liu-MSFT