You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Data Movement | NuGet [12.2.1](https://www.nuget.org/packages/Azure.Storage.DataMovement/12.2.1)|[docs](/dotnet/api/overview/azure/Storage.DataMovement-readme)| GitHub [12.2.1](https://github.com/Azure/azure-sdk-for-net/tree/Azure.Storage.DataMovement_12.2.1/sdk/storage/Azure.Storage.DataMovement/)|
|[X500DistinguishedName validation is stricter](cryptography/10.0/x500distinguishedname-validation.md)| Behavioral change | Preview 1 |
66
+
|[X509Certificate and PublicKey key parameters can be null](cryptography/10.0/x509-publickey-null.md)| Behavioral/source incompatible change | Preview 3 |
|[X500DistinguishedName validation is stricter](cryptography/10.0/x500distinguishedname-validation.md)| Behavioral change | Preview 1 |
83
-
|[X509Certificate and PublicKey key parameters can be null](cryptography/10.0/x509-publickey-null.md)| Behavioral/source incompatible change | Preview 3 |
# WebHostBuilder, IWebHost, and WebHost are obsolete
10
+
11
+
<xref:Microsoft.AspNetCore.Hosting.WebHostBuilder>, <xref:Microsoft.AspNetCore.Hosting.IWebHost>, and <xref:Microsoft.AspNetCore.WebHost> have been marked as obsolete in .NET 10. `WebHostBuilder` was replaced by `HostBuilder` ([generic host](/aspnet/core/fundamentals/host/generic-host)) in ASP.NET Core 3.0, and `WebApplicationBuilder` was introduced in ASP.NET Core 6.0. These newer alternatives are where future investments will occur.
12
+
13
+
## Version introduced
14
+
15
+
.NET 10 RC 1
16
+
17
+
## Previous behavior
18
+
19
+
Previously, you could use `WebHostBuilder` to configure and build a web host without any compile-time warnings.
20
+
21
+
## New behavior
22
+
23
+
Starting in .NET 10, using `WebHostBuilder` produces a compiler warning with diagnostic ID `ASPDEPR004`:
24
+
25
+
> warning ASPDEPR004: WebHostBuilder is deprecated in favor of HostBuilder and WebApplicationBuilder. For more information, visit <https://aka.ms/aspnet/deprecate/004>.
26
+
27
+
Using `IWebHost` or `WebHost` produces a compiler warning with diagnostic ID `ASPDEPR008`:
28
+
29
+
> warning ASPDEPR008: WebHost is obsolete. Use HostBuilder or WebApplicationBuilder instead. For more information, visit <https://aka.ms/aspnet/deprecate/008>.
30
+
31
+
## Type of breaking change
32
+
33
+
This change can affect [source compatibility](../../categories.md#source-compatibility).
34
+
35
+
## Reason for change
36
+
37
+
`HostBuilder` and <xref:Microsoft.AspNetCore.Builder.WebApplication> have all the features of `WebHostBuilder` and are the focus of future investment. `WebHostBuilder` was replaced by the generic host in ASP.NET Core 3.0, and minimal APIs with <xref:Microsoft.AspNetCore.Builder.WebApplicationBuilder> were introduced in ASP.NET Core 6.0. These newer hosting models provide better integration with the .NET ecosystem and are the recommended approach for new applications.
38
+
39
+
## Recommended action
40
+
41
+
Migrate from `WebHostBuilder` to either [`HostBuilder`](/aspnet/core/fundamentals/host/generic-host) or [`WebApplication`](/aspnet/core/fundamentals/minimal-apis/webapplication):
42
+
43
+
- For applications that need the full hosting capabilities, migrate to `HostBuilder`:
44
+
45
+
**Before:**
46
+
47
+
```csharp
48
+
varhostBuilder=newWebHostBuilder()
49
+
.UseContentRoot(Directory.GetCurrentDirectory())
50
+
.UseStartup()
51
+
.UseKestrel();
52
+
// Test code might use TestServer:
53
+
vartestServer=newTestServer(hostBuilder);
54
+
```
55
+
56
+
**After:**
57
+
58
+
```csharp
59
+
usingvarhost=newHostBuilder()
60
+
.ConfigureWebHost(webHostBuilder=>
61
+
{
62
+
webHostBuilder
63
+
.UseTestServer() // If using TestServer.
64
+
.UseContentRoot(Directory.GetCurrentDirectory())
65
+
.UseStartup()
66
+
.UseKestrel();
67
+
})
68
+
.Build();
69
+
awaithost.StartAsync();
70
+
71
+
vartestServer=host.GetTestServer();
72
+
```
73
+
74
+
- For new applications, especially those using minimal APIs, migrate to <xref:Microsoft.AspNetCore.Builder.WebApplicationBuilder>.
Copy file name to clipboardExpand all lines: docs/core/compatibility/core-libraries/10.0/obsolete-apis.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: "Breaking change: .NET 10 obsoletions with custom IDs"
3
3
titleSuffix: ""
4
4
description: Learn about the APIs that have been marked as obsolete in .NET 10 with a custom diagnostic ID.
5
-
ms.date: 03/28/2025
5
+
ms.date: 09/08/2025
6
6
ai-usage: ai-assisted
7
7
---
8
8
# API obsoletions with non-default diagnostic IDs (.NET 10)
@@ -21,6 +21,7 @@ The following table lists the custom diagnostic IDs and their corresponding warn
21
21
|[SYSLIB0059](../../../../fundamentals/syslib-diagnostics/syslib0059.md)|<xref:Microsoft.Win32.SystemEvents.EventsThreadShutdown?displayProperty=nameWithType> callbacks aren't run before the process exits. Use <xref:System.AppDomain.ProcessExit?displayProperty=nameWithType> instead. | Warning |
22
22
|[SYSLIB0060](../../../../fundamentals/syslib-diagnostics/syslib0060.md)|<xref:System.Security.Cryptography.Rfc2898DeriveBytes?displayProperty=nameWithType> constructors are obsolete. Use <xref:System.Security.Cryptography.Rfc2898DeriveBytes.Pbkdf2*?displayProperty=nameWithType> instead. | Warning |
23
23
|[SYSLIB0061](../../../../fundamentals/syslib-diagnostics/syslib0061.md)|<xref:System.Linq.Queryable.MaxBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IComparer{``0})?displayProperty=nameWithType> and <xref:System.Linq.Queryable.MinBy``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},System.Collections.Generic.IComparer{``0})?displayProperty=nameWithType> taking an `IComparer<TSource>` are obsolete. Use the new ones that take an `IComparer<TKey>`. | Warning |
24
+
|[SYSLIB0062](../../../../fundamentals/syslib-diagnostics/syslib0062.md)|<xref:System.Xml.Xsl.XsltSettings.EnableScript?displayProperty=nameWithType> is obsolete. | Warning |
24
25
25
26
## Version introduced
26
27
@@ -64,6 +65,10 @@ These obsoletions can affect [source compatibility](../../categories.md#source-c
Some methods and properties in the `[Experimental]` post-quantum cryptography (PQC) classes <xref:System.Security.Cryptography.MLDsa?displayProperty=fullName> and <xref:System.Security.Cryptography.SlhDsa?displayProperty=fullName> have been renamed. APIs that involve the `sk` value from their respective specifications now have `PrivateKey` in their names instead of `SecretKey`.
12
+
13
+
## Version introduced
14
+
15
+
.NET 10 RC 1
16
+
17
+
## Previous behavior
18
+
19
+
Previously, you could call methods like `ImportMLDsaSecretKey` and `ImportSlhDsaSecretKey`, and you could access properties like `SecretKeySizeInBytes`.
20
+
21
+
## New behavior
22
+
23
+
Starting in .NET 10 RC 1, you must call methods like `ImportMLDsaPrivateKey` or `ImportSlhDsaPrivateKey`, and access properties like `PrivateKeySizeInBytes`.
24
+
25
+
## Type of breaking change
26
+
27
+
This change can affect [source compatibility](../../categories.md#source-compatibility).
28
+
29
+
## Reason for change
30
+
31
+
The change was made to align with existing asymmetric cryptography types in .NET and with related members such as <xref:System.Security.Cryptography.MLDsa.ExportPkcs8PrivateKey>.
32
+
33
+
## Recommended action
34
+
35
+
Resolve any compile breaks from this change by replacing instances of `SecretKey` with `PrivateKey` in the called member names:
0 commit comments