Azure Pipelines NuGet restore and Azure Artifacts SemVer 2.0 build metadata normalization
0 reputation · 02 Dec 2022, 13:10 UTC
Azure Pipelines NuGet restore and Azure Artifacts SemVer 2.0 build metadata normalization
A pipeline restores a NuGet package from an Azure Artifacts feed. The package version contains SemVer 2.0 build metadata, such as 1.0.0-beta.1+build.123. Azure Artifacts normalizes imported versions by dropping build metadata, so the feed may store 1.0.0-beta.1 while the project expects the original string.
The goal is to determine whether the NuGet client invoked by Azure Pipelines resolves the normalized version without failure or silent substitution, and whether behavior differs between Azure DevOps Services and Azure DevOps Server 2022, or between dotnet restore and nuget.exe. Upstream proxying and package promotion between feeds may also affect which version string reaches the restore step. This should be verified against the target feed and client version before relying on build metadata in production.
Questions:
- Does Azure Pipelines NuGet restore accept the normalized version from Azure Artifacts when the project declares the original SemVer 2.0 build metadata?
- Are there version-assumption differences between Azure DevOps Services and Azure DevOps Server 2022 for this normalization?
- Does the NuGet client version (
dotnetSDK versusnuget.exe) change whether missing build metadata causes a restore warning or failure?