-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Document Microsoft.Extensions.ApiDescription.Client package deprecation breaking change #47889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
docs/core/compatibility/aspnet-core/10/apidescription-client-deprecated.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| --- | ||
| title: "Breaking change - Microsoft.Extensions.ApiDescription.Client package deprecated" | ||
| description: "Learn about the breaking change in ASP.NET Core 10 where the Microsoft.Extensions.ApiDescription.Client package has been deprecated." | ||
| ms.date: 08/07/2025 | ||
| ai-usage: ai-assisted | ||
| ms.custom: https://github.com/aspnet/Announcements/issues/518 | ||
| --- | ||
|
|
||
| # Microsoft.Extensions.ApiDescription.Client package deprecated | ||
|
|
||
| The Microsoft.Extensions.ApiDescription.Client NuGet package has been deprecated. The package supplied MSBuild targets and CLI support that generated OpenAPI-based client code during the build. Projects that reference the package now receive a warning during build. | ||
|
|
||
| ## Version introduced | ||
|
|
||
| .NET 10 Preview 7 | ||
|
|
||
| ## Previous behavior | ||
|
|
||
| Projects could add `<PackageReference Include="Microsoft.Extensions.ApiDescription.Client" ... />` and `<OpenApiReference>` items (or run `dotnet openapi`) to generate strongly typed clients at build time. | ||
|
|
||
| ```xml | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <TargetFramework>net10.0</TargetFramework> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="Microsoft.Extensions.ApiDescription.Client" Version="8.0.0" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <OpenApiReference Include="swagger.json" /> | ||
| </ItemGroup> | ||
| </Project> | ||
| ``` | ||
|
|
||
| ## New behavior | ||
|
|
||
| The package is now deprecated and projects that reference it receive build warnings. The MSBuild targets and CLI commands are no longer supported. | ||
|
|
||
| ## Type of breaking change | ||
|
|
||
| This change can affect [source compatibility](../../categories.md#source-compatibility). | ||
|
|
||
| ## Reason for change | ||
|
|
||
| - The package has seen minimal updates and maintenance since its introduction. | ||
| - Its abstractions were tightly coupled to certain generators and did not scale well to others. Each generator now ships its own CLI/configuration experience, making the MSBuild middle-layer redundant. | ||
| - Removing the package reduces maintenance burden and clarifies the recommended workflow for client generation. | ||
|
|
||
| ## Recommended action | ||
|
|
||
| - Remove any `<PackageReference Include="Microsoft.Extensions.ApiDescription.Client" … />` from your project. | ||
| - Replace `<OpenApiReference>` items or `dotnet openapi` commands with generator-specific tooling: | ||
| - NSwag – Use `npx nswag` or `dotnet tool run nswag` with an `.nswag` config file. | ||
| - Kiota – Install with `dotnet tool install -g Microsoft.OpenApi.Kiota` and run `kiota generate`. | ||
| - OpenAPI generator – Invoke `openapi-generator-cli` via JAR or Docker. | ||
| - Commit the generated client code or run generation in a custom pre-build step that doesn't rely on the removed package. | ||
|
|
||
| ## Affected APIs | ||
|
|
||
| - MSBuild item `OpenApiReference` (all instances). | ||
| - MSBuild property `OpenApiProjectReference`. | ||
| - CLI command `dotnet openapi`. | ||
gewarren marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.