dotnet-api-versioning
dotnet-api-versioning
API versioning strategies for ASP.NET Core using the Asp.Versioning library family. URL segment versioning (/api/v1/) is the preferred approach for simplicity and discoverability. This skill covers URL, header, and query string versioning with configuration for both Minimal APIs and MVC controllers, sunset policy enforcement, and migration from legacy packages.
Out of scope: Minimal API endpoint patterns (route groups, filters, TypedResults) -- see [skill:dotnet-minimal-apis]. OpenAPI document generation per API version -- see [skill:dotnet-openapi]. Authentication and authorization per version -- see [skill:dotnet-api-security].
Cross-references: [skill:dotnet-minimal-apis] for Minimal API endpoint patterns, [skill:dotnet-openapi] for versioned OpenAPI documents.
Package Landscape
| Package | Target | Status |
|---|---|---|
Asp.Versioning.Http |
Minimal APIs | Current |
Asp.Versioning.Mvc.ApiExplorer |
MVC controllers + API Explorer | Current |
Asp.Versioning.Mvc |
MVC controllers (no API Explorer) | Current |
Microsoft.AspNetCore.Mvc.Versioning |
MVC controllers | Legacy -- migrate to Asp.Versioning.Mvc |
Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer |
MVC + API Explorer | Legacy -- migrate to Asp.Versioning.Mvc.ApiExplorer |