My team are looking to push our shared code to a private NuGet feed in Azure Artifacts. At present the plan is to set the package version in our csproj files and set up CI on the master branch of each library's repo.

For production this flow is fine, but we'd also like to be able to iterate on new library versions and share those iterations with other developers on the same project before the new version of the library is finalized.

One way of doing this would be to use a second, pre-production NuGet feed and set up CI from a development branch to that feed. But I was wondering if we could keep things to a single feed by using Azure Artifacts views functionality.

So the general idea is - be able to package and share code with a restricted audience while it's being worked on, but prevent the new version(s) from being used outside of that audience until the library developer is ready.

  • Did you consider using prerelease versioning? It won’t (really) hide your alpha/beta packages, but it could be good enough considering your feed is private anyway. – Rik D Apr 17 at 20:56
  • Yes I believe that's what the different "views" will let me do, but I haven't quite figured out how we could use that to prevent unfinished library code being used in production applications. For example, you can't see if a hypothetical 2.1.0 package is in prerelease or release during a code review. You also can't, to my knowledge, set the dotnet restore step in Azure Pipelines to only restore from versions in the Release view. – setagana Apr 18 at 7:22
  • If you simply call your package "2.1.0-pre01", it will not show up in the Visual Studio NuGet package manager unless the Include Prerelease checkbox is marked. There is a conventon that says you should use -alpha, -beta or -rc, optionally with versioning like -beta123, but afaik anything with a hyphen is considered a prerelease. – Rik D Apr 18 at 20:53
  • @RikD thanks for thinking with me. There are some issues with using the pre-release version suffix for our workflow, but I don't think we'll be able to get closer with the functionality we have available. – setagana Apr 23 at 14:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.