Skip to content

Commit 7be6dad

Browse files
authored
Merge pull request #47905 from dotnet/main
Merge main into live
2 parents 3670dec + 765e0cb commit 7be6dad

File tree

34 files changed

+571
-81
lines changed

34 files changed

+571
-81
lines changed

docs/azure/includes/dotnet-all.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@
215215
| Resource Management - Container Registry | NuGet [1.3.0](https://www.nuget.org/packages/Azure.ResourceManager.ContainerRegistry/1.3.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ContainerRegistry-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerRegistry_1.3.0/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/) |
216216
| Resource Management - Container Service | NuGet [1.2.5](https://www.nuget.org/packages/Azure.ResourceManager.ContainerService/1.2.5) | [docs](/dotnet/api/overview/azure/ResourceManager.ContainerService-readme) | GitHub [1.2.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerService_1.2.5/sdk/containerservice/Azure.ResourceManager.ContainerService/) |
217217
| Resource Management - Container Service Fleet | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.ContainerServiceFleet/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ContainerServiceFleet-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerServiceFleet_1.1.0/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/) |
218-
| Resource Management - Content Delivery Network | NuGet [1.4.0](https://www.nuget.org/packages/Azure.ResourceManager.Cdn/1.4.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Cdn-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Cdn_1.4.0/sdk/cdn/Azure.ResourceManager.Cdn/) |
218+
| Resource Management - Content Delivery Network | NuGet [1.5.0](https://www.nuget.org/packages/Azure.ResourceManager.Cdn/1.5.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Cdn-readme) | GitHub [1.5.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Cdn_1.5.0/sdk/cdn/Azure.ResourceManager.Cdn/) |
219219
| Resource Management - Cosmos DB | NuGet [1.3.2](https://www.nuget.org/packages/Azure.ResourceManager.CosmosDB/1.3.2)<br>NuGet [1.4.0-beta.13](https://www.nuget.org/packages/Azure.ResourceManager.CosmosDB/1.4.0-beta.13) | [docs](/dotnet/api/overview/azure/ResourceManager.CosmosDB-readme) | GitHub [1.3.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CosmosDB_1.3.2/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/)<br>GitHub [1.4.0-beta.13](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CosmosDB_1.4.0-beta.13/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/) |
220220
| Resource Management - Cosmos DB for PostgreSQL | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.CosmosDBForPostgreSql/1.0.0)<br>NuGet [1.1.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.CosmosDBForPostgreSql/1.1.0-beta.2) | [docs](/dotnet/api/overview/azure/ResourceManager.CosmosDBForPostgreSql-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CosmosDBForPostgreSql_1.0.0/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/)<br>GitHub [1.1.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CosmosDBForPostgreSql_1.1.0-beta.2/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/) |
221221
| Resource Management - Costmanagement | NuGet [1.0.2](https://www.nuget.org/packages/Azure.ResourceManager.CostManagement/1.0.2) | [docs](/dotnet/api/overview/azure/ResourceManager.CostManagement-readme) | GitHub [1.0.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CostManagement_1.0.2/sdk/costmanagement/Azure.ResourceManager.CostManagement/) |

docs/azure/includes/dotnet-new.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@
223223
| Resource Management - Container Registry | NuGet [1.3.0](https://www.nuget.org/packages/Azure.ResourceManager.ContainerRegistry/1.3.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ContainerRegistry-readme) | GitHub [1.3.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerRegistry_1.3.0/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/) |
224224
| Resource Management - Container Service | NuGet [1.2.5](https://www.nuget.org/packages/Azure.ResourceManager.ContainerService/1.2.5) | [docs](/dotnet/api/overview/azure/ResourceManager.ContainerService-readme) | GitHub [1.2.5](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerService_1.2.5/sdk/containerservice/Azure.ResourceManager.ContainerService/) |
225225
| Resource Management - Container Service Fleet | NuGet [1.1.0](https://www.nuget.org/packages/Azure.ResourceManager.ContainerServiceFleet/1.1.0) | [docs](/dotnet/api/overview/azure/ResourceManager.ContainerServiceFleet-readme) | GitHub [1.1.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.ContainerServiceFleet_1.1.0/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/) |
226-
| Resource Management - Content Delivery Network | NuGet [1.4.0](https://www.nuget.org/packages/Azure.ResourceManager.Cdn/1.4.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Cdn-readme) | GitHub [1.4.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Cdn_1.4.0/sdk/cdn/Azure.ResourceManager.Cdn/) |
226+
| Resource Management - Content Delivery Network | NuGet [1.5.0](https://www.nuget.org/packages/Azure.ResourceManager.Cdn/1.5.0) | [docs](/dotnet/api/overview/azure/ResourceManager.Cdn-readme) | GitHub [1.5.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.Cdn_1.5.0/sdk/cdn/Azure.ResourceManager.Cdn/) |
227227
| Resource Management - Cosmos DB | NuGet [1.3.2](https://www.nuget.org/packages/Azure.ResourceManager.CosmosDB/1.3.2)<br>NuGet [1.4.0-beta.13](https://www.nuget.org/packages/Azure.ResourceManager.CosmosDB/1.4.0-beta.13) | [docs](/dotnet/api/overview/azure/ResourceManager.CosmosDB-readme) | GitHub [1.3.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CosmosDB_1.3.2/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/)<br>GitHub [1.4.0-beta.13](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CosmosDB_1.4.0-beta.13/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/) |
228228
| Resource Management - Cosmos DB for PostgreSQL | NuGet [1.0.0](https://www.nuget.org/packages/Azure.ResourceManager.CosmosDBForPostgreSql/1.0.0)<br>NuGet [1.1.0-beta.2](https://www.nuget.org/packages/Azure.ResourceManager.CosmosDBForPostgreSql/1.1.0-beta.2) | [docs](/dotnet/api/overview/azure/ResourceManager.CosmosDBForPostgreSql-readme) | GitHub [1.0.0](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CosmosDBForPostgreSql_1.0.0/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/)<br>GitHub [1.1.0-beta.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CosmosDBForPostgreSql_1.1.0-beta.2/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/) |
229229
| Resource Management - Costmanagement | NuGet [1.0.2](https://www.nuget.org/packages/Azure.ResourceManager.CostManagement/1.0.2) | [docs](/dotnet/api/overview/azure/ResourceManager.CostManagement-readme) | GitHub [1.0.2](https://github.com/Azure/azure-sdk-for-net/tree/Azure.ResourceManager.CostManagement_1.0.2/sdk/costmanagement/Azure.ResourceManager.CostManagement/) |

docs/core/compatibility/10.0.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ 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+
| [Deprecation of WithOpenApi extension method](aspnet-core/10/withopenapi-deprecated.md) | Source incompatible | Preview 7 |
23+
| [IActionContextAccessor and ActionContextAccessor are obsolete](aspnet-core/10/iactioncontextaccessor-obsolete.md) | Source incompatible/behavioral change | Preview 7 |
24+
| [IncludeOpenAPIAnalyzers property and MVC API analyzers are deprecated](aspnet-core/10/openapi-analyzers-deprecated.md) | Source incompatible | Preview 7 |
25+
| [Microsoft.Extensions.ApiDescription.Client package deprecated](aspnet-core/10/apidescription-client-deprecated.md) | Source incompatible | Preview 7 |
26+
1827
## Containers
1928

2029
| Title | Type of change | Introduced version |
@@ -56,6 +65,7 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af
5665

5766
| Title | Type of change | Introduced version |
5867
|-------|-------------------|--------------------|
68+
| [CoseSigner.Key can be null](cryptography/10.0/cosesigner-key-null.md) | Behavioral/source incompatible change | Preview 7 |
5969
| [OpenSSL cryptographic primitives aren't supported on macOS](cryptography/10.0/openssl-macos-unsupported.md) | Behavioral change | Preview 6 |
6070
| [X500DistinguishedName validation is stricter](cryptography/10.0/x500distinguishedname-validation.md) | Behavioral change | Preview 1 |
6171
| [X509Certificate and PublicKey key parameters can be null](cryptography/10.0/x509-publickey-null.md) | Behavioral/source incompatible change | Preview 3 |
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).
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
title: "IActionContextAccessor and ActionContextAccessor are obsolete"
3+
description: "Learn about the breaking change in ASP.NET Core 10 where IActionContextAccessor and ActionContextAccessor are marked as obsolete."
4+
ms.date: 08/07/2025
5+
ai-usage: ai-assisted
6+
ms.custom: https://github.com/aspnet/Announcements/issues/520
7+
---
8+
9+
# IActionContextAccessor and ActionContextAccessor are obsolete
10+
11+
<xref:Microsoft.AspNetCore.Mvc.Infrastructure.IActionContextAccessor> and <xref:Microsoft.AspNetCore.Mvc.Infrastructure.ActionContextAccessor> have been marked as obsolete with diagnostic ID `ASPDEPR006`. With the introduction of endpoint routing, `IActionContextAccessor` is no longer necessary as developers can access action descriptor and metadata information directly through `HttpContext.GetEndpoint()`.
12+
13+
## Version introduced
14+
15+
.NET 10 Preview 7
16+
17+
## Previous behavior
18+
19+
Previously, you could use `IActionContextAccessor` to access the current <xref:Microsoft.AspNetCore.Mvc.ActionContext>:
20+
21+
```csharp
22+
public class MyService
23+
{
24+
private readonly IActionContextAccessor _actionContextAccessor;
25+
26+
public MyService(IActionContextAccessor actionContextAccessor)
27+
{
28+
_actionContextAccessor = actionContextAccessor;
29+
}
30+
31+
public void DoSomething()
32+
{
33+
var actionContext = _actionContextAccessor.ActionContext;
34+
var actionDescriptor = actionContext?.ActionDescriptor;
35+
// Use action descriptor metadata.
36+
}
37+
}
38+
```
39+
40+
## New behavior
41+
42+
Starting in .NET 10, using `IActionContextAccessor` and `ActionContextAccessor` produces a compiler warning with diagnostic ID `ASPDEPR006`:
43+
44+
> warning ASPDEPR006: ActionContextAccessor is obsolete and will be removed in a future version. For more information, visit <https://aka.ms/aspnet/deprecate/006>.
45+
46+
## Type of breaking change
47+
48+
This change can affect [source compatibility](../../categories.md#source-compatibility).
49+
50+
## Reason for change
51+
52+
With the introduction of endpoint routing in ASP.NET Core, `IActionContextAccessor` is no longer necessary. The endpoint routing infrastructure provides a cleaner, more direct way to access endpoint metadata through `HttpContext.GetEndpoint()`, aligning with ASP.NET Core's architectural evolution toward endpoint routing.
53+
54+
## Recommended action
55+
56+
Migrate from `IActionContextAccessor` to <xref:Microsoft.AspNetCore.Http.IHttpContextAccessor> and use `HttpContext.GetEndpoint()`:
57+
58+
Before:
59+
60+
```csharp
61+
public class MyService
62+
{
63+
private readonly IActionContextAccessor _actionContextAccessor;
64+
65+
public MyService(IActionContextAccessor actionContextAccessor)
66+
{
67+
_actionContextAccessor = actionContextAccessor;
68+
}
69+
70+
public void DoSomething()
71+
{
72+
var actionContext = _actionContextAccessor.ActionContext;
73+
var actionDescriptor = actionContext?.ActionDescriptor;
74+
// Use action descriptor metadata
75+
}
76+
}
77+
```
78+
79+
After:
80+
81+
```csharp
82+
public class MyService
83+
{
84+
private readonly IHttpContextAccessor _httpContextAccessor;
85+
86+
public MyService(IHttpContextAccessor httpContextAccessor)
87+
{
88+
_httpContextAccessor = httpContextAccessor;
89+
}
90+
91+
public void DoSomething()
92+
{
93+
var httpContext = _httpContextAccessor.HttpContext;
94+
var endpoint = httpContext?.GetEndpoint();
95+
var actionDescriptor = endpoint?.Metadata.GetMetadata<ActionDescriptor>();
96+
// Use action descriptor metadata.
97+
}
98+
}
99+
```
100+
101+
## Affected APIs
102+
103+
- <xref:Microsoft.AspNetCore.Mvc.Infrastructure.IActionContextAccessor?displayProperty=fullName>
104+
- <xref:Microsoft.AspNetCore.Mvc.Infrastructure.ActionContextAccessor?displayProperty=fullName>
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
---
2+
title: "IncludeOpenAPIAnalyzers property and MVC API analyzers are deprecated"
3+
description: "Learn about the breaking change in ASP.NET Core 10 where the IncludeOpenAPIAnalyzers property and its associated MVC API analyzers are deprecated."
4+
ms.date: 08/07/2025
5+
ai-usage: ai-assisted
6+
ms.custom: https://github.com/aspnet/Announcements/issues/521
7+
---
8+
9+
# IncludeOpenAPIAnalyzers property and MVC API analyzers are deprecated
10+
11+
The `IncludeOpenAPIAnalyzers` MSBuild property and its associated MVC API analyzers are deprecated and will be removed in a future release. When `IncludeOpenAPIAnalyzers` is set to `true`, the build now emits warning `ASPDEPR007`.
12+
13+
## Version introduced
14+
15+
.NET 10 Preview 7
16+
17+
## Previous behavior
18+
19+
Previously, developers could set `<IncludeOpenAPIAnalyzers>true</IncludeOpenAPIAnalyzers>` in their Web SDK projects to enable MVC API analyzers without any warnings or deprecation notices.
20+
21+
```xml
22+
<Project Sdk="Microsoft.NET.Sdk.Web">
23+
<PropertyGroup>
24+
<TargetFramework>net9.0</TargetFramework>
25+
<IncludeOpenAPIAnalyzers>true</IncludeOpenAPIAnalyzers>
26+
</PropertyGroup>
27+
</Project>
28+
```
29+
30+
Such a project built successfully without any deprecation warnings.
31+
32+
## New behavior
33+
34+
Starting in .NET 10, when `IncludeOpenAPIAnalyzers` is set to `true`, the build emits warning `ASPDEPR007`:
35+
36+
> warning ASPDEPR007: The IncludeOpenAPIAnalyzers property and its associated MVC API analyzers are deprecated and will be removed in a future release.
37+
38+
The analyzers continue to function, but developers receive this deprecation warning during compilation.
39+
40+
## Type of breaking change
41+
42+
This change can affect [source compatibility](../../categories.md#source-compatibility).
43+
44+
## Reason for change
45+
46+
The MVC API analyzers were originally introduced to help keep return types and attributes in sync for API controllers, ensuring consistency between method signatures and their corresponding OpenAPI documentation. These analyzers provided compile-time validation to catch mismatches between declared return types and the actual types returned by controller actions.
47+
48+
However, with the introduction of Minimal APIs and the <xref:Microsoft.AspNetCore.Http.TypedResults> pattern, the .NET ecosystem has evolved toward a more type-safe approach for API development. `TypedResults` provides compile-time guarantees about response types without requiring additional analyzers, making the MVC API analyzers redundant for modern .NET applications. In .NET 10, `TypedResults` are supported in controller-based APIs.
49+
50+
Previous approach with MVC API analyzers:
51+
52+
```csharp
53+
[HttpGet]
54+
[ProducesResponseType<Product>(200)]
55+
[ProducesResponseType(404)]
56+
public async Task<ActionResult> GetProduct(int id)
57+
{
58+
var product = await _productService.GetByIdAsync(id);
59+
if (product == null)
60+
return NotFound(); // Analyzer ensures this matches ProducesResponseType(404)
61+
62+
return Ok(product); // Analyzer ensures this matches ProducesResponseType<Product>(200)
63+
}
64+
```
65+
66+
Modern approach with `TypedResults`:
67+
68+
```csharp
69+
[HttpGet("{id}")]
70+
public async Task<Results<Ok<Product>, NotFound>> GetProduct(int id)
71+
{
72+
var product = await _productService.GetByIdAsync(id);
73+
return product == null
74+
? TypedResults.NotFound()
75+
: TypedResults.Ok(product);
76+
}
77+
```
78+
79+
The `TypedResults` pattern eliminates the need for separate analyzers because the return type itself (`Results<Ok<Product>, NotFound>`) explicitly declares all possible response types at compile time. This approach is more maintainable, provides better IntelliSense support, and automatically generates accurate OpenAPI documentation without additional tooling.
80+
81+
As the .NET ecosystem continues to embrace `TypedResults` as the recommended pattern for API development, the MVC API analyzers have become obsolete and are being deprecated to streamline the development experience.
82+
83+
## Recommended action
84+
85+
Developers should:
86+
87+
- Remove the deprecated property: Remove `<IncludeOpenAPIAnalyzers>true</IncludeOpenAPIAnalyzers>` from your project files to eliminate the warning.
88+
- Migrate to `TypedResults`: Migrate to the `TypedResults` pattern to ensure better consistency between application behavior and OpenAPI documentation.
89+
90+
If you need to continue using the deprecated analyzers temporarily, you can suppress the warning:
91+
92+
```xml
93+
<PropertyGroup>
94+
<NoWarn>$(NoWarn);ASPDEPR007</NoWarn>
95+
</PropertyGroup>
96+
```
97+
98+
## Affected APIs
99+
100+
- MSBuild property: `IncludeOpenAPIAnalyzers`.
101+
- Associated MVC API analyzers included when `IncludeOpenAPIAnalyzers` is `true`.

0 commit comments

Comments
 (0)