Skip to content

Commit a9fff25

Browse files
authored
Document Microsoft.Extensions.ApiDescription.Client package deprecation breaking change (#47889)
1 parent 9967f5e commit a9fff25

File tree

3 files changed

+74
-0
lines changed

3 files changed

+74
-0
lines changed

docs/core/compatibility/10.0.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af
1515
> [!NOTE]
1616
> This article is a work in progress. It's not a complete list of breaking changes in .NET 10.
1717
18+
## ASP.NET Core
19+
20+
| Title | Type of change | Introduced version |
21+
|-------|---------------------|--------------------|
22+
| [Microsoft.Extensions.ApiDescription.Client package deprecated](aspnet-core/10/apidescription-client-deprecated.md) | Source incompatible | Preview 7 |
23+
1824
## Containers
1925

2026
| Title | Type of change | Introduced version |
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
title: "Breaking change - Microsoft.Extensions.ApiDescription.Client package deprecated"
3+
description: "Learn about the breaking change in ASP.NET Core 10 where the Microsoft.Extensions.ApiDescription.Client package has been deprecated."
4+
ms.date: 08/07/2025
5+
ai-usage: ai-assisted
6+
ms.custom: https://github.com/aspnet/Announcements/issues/518
7+
---
8+
9+
# Microsoft.Extensions.ApiDescription.Client package deprecated
10+
11+
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.
12+
13+
## Version introduced
14+
15+
.NET 10 Preview 7
16+
17+
## Previous behavior
18+
19+
Projects could add `<PackageReference Include="Microsoft.Extensions.ApiDescription.Client" ... />` and `<OpenApiReference>` items (or run `dotnet openapi`) to generate strongly typed clients at build time.
20+
21+
```xml
22+
<Project Sdk="Microsoft.NET.Sdk">
23+
<PropertyGroup>
24+
<TargetFramework>net10.0</TargetFramework>
25+
</PropertyGroup>
26+
27+
<ItemGroup>
28+
<PackageReference Include="Microsoft.Extensions.ApiDescription.Client" Version="8.0.0" />
29+
</ItemGroup>
30+
31+
<ItemGroup>
32+
<OpenApiReference Include="swagger.json" />
33+
</ItemGroup>
34+
</Project>
35+
```
36+
37+
## New behavior
38+
39+
The package is now deprecated and projects that reference it receive build warnings. The MSBuild targets and CLI commands are no longer supported.
40+
41+
## Type of breaking change
42+
43+
This change can affect [source compatibility](../../categories.md#source-compatibility).
44+
45+
## Reason for change
46+
47+
- The package has seen minimal updates and maintenance since its introduction.
48+
- 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.
49+
- Removing the package reduces maintenance burden and clarifies the recommended workflow for client generation.
50+
51+
## Recommended action
52+
53+
- Remove any `<PackageReference Include="Microsoft.Extensions.ApiDescription.Client" … />` from your project.
54+
- Replace `<OpenApiReference>` items or `dotnet openapi` commands with generator-specific tooling:
55+
- NSwag – Use `npx nswag` or `dotnet tool run nswag` with an `.nswag` config file.
56+
- Kiota – Install with `dotnet tool install -g Microsoft.OpenApi.Kiota` and run `kiota generate`.
57+
- OpenAPI generator – Invoke `openapi-generator-cli` via JAR or Docker.
58+
- Commit the generated client code or run generation in a custom pre-build step that doesn't rely on the removed package.
59+
60+
## Affected APIs
61+
62+
- MSBuild item `OpenApiReference` (all instances).
63+
- MSBuild property `OpenApiProjectReference`.
64+
- CLI command [`dotnet openapi`](/aspnet/core/fundamentals/openapi/openapi-tools).

docs/core/compatibility/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ items:
88
items:
99
- name: Overview
1010
href: 10.0.md
11+
- name: ASP.NET Core
12+
items:
13+
- name: Microsoft.Extensions.ApiDescription.Client package deprecated
14+
href: aspnet-core/10/apidescription-client-deprecated.md
1115
- name: Containers
1216
items:
1317
- name: Default .NET images use Ubuntu

0 commit comments

Comments
 (0)