Skip to content

Commit 35a968f

Browse files
Copilotgewarren
andcommitted
Document Microsoft.Extensions.ApiDescription.Client deprecation breaking change
Co-authored-by: gewarren <[email protected]>
1 parent 0a6d1a9 commit 35a968f

File tree

3 files changed

+76
-0
lines changed

3 files changed

+76
-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.0/apidescription-client-deprecated.md) | Source incompatible | Preview 7 |
23+
1824
## Containers
1925

2026
| Title | Type of change | Introduced version |
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
title: "Breaking change - Microsoft.Extensions.ApiDescription.Client package deprecated"
3+
description: "Learn about the breaking change in .NET 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 starting in .NET 10. 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 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.
49+
- Each generator now ships its own CLI/configuration experience, making the MSBuild middle-layer redundant.
50+
- Removing the package reduces maintenance burden and clarifies the recommended workflow for client generation.
51+
52+
## Recommended action
53+
54+
1. **Remove** any `<PackageReference Include="Microsoft.Extensions.ApiDescription.Client" … />` from your project.
55+
2. Replace `<OpenApiReference>` items or `dotnet openapi` commands with generator-specific tooling:
56+
- **NSwag** – use `npx nswag` or `dotnet tool run nswag` with an `.nswag` config file.
57+
- **Kiota** – install with `dotnet tool install -g Microsoft.OpenApi.Kiota` and run `kiota generate`.
58+
- **OpenAPI Generator** – invoke `openapi-generator-cli` via JAR or Docker.
59+
3. Commit the generated client code or run generation in a custom pre-build step that does not rely on the removed package.
60+
61+
## Affected APIs
62+
63+
- NuGet package **Microsoft.Extensions.ApiDescription.Client**
64+
- MSBuild item **`OpenApiReference`** (all instances)
65+
- MSBuild property **`OpenApiProjectReference`**
66+
- CLI command **`dotnet openapi`**

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.0/apidescription-client-deprecated.md
1115
- name: Containers
1216
items:
1317
- name: Default .NET images use Ubuntu

0 commit comments

Comments
 (0)