Skip to content

Commit 383efc6

Browse files
authored
Add HTTP3 breaking change documentation for .NET 10 Preview 6 (#47526)
1 parent 4535fde commit 383efc6

File tree

4 files changed

+57
-3
lines changed

4 files changed

+57
-3
lines changed

docs/core/compatibility/10.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af
6868

6969
| Title | Type of change | Introduced version |
7070
|-------|-------------------|--------------------|
71+
| [HTTP/3 support disabled by default with PublishTrimmed](networking/10.0/http3-disabled-with-publishtrimmed.md) | Source incompatible | Preview 6 |
7172
| [HttpClient/SslStream default certificate revocation check mode changed to Online](networking/10.0/ssl-certificate-revocation-check-default.md) | Behavioral change | Preview 6 |
7273
| [Streaming HTTP responses enabled by default in browser HTTP clients](networking/10.0/default-http-streaming.md) | Behavioral change | Preview 3 |
7374

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: "Breaking change - HTTP/3 support in System.Net.Http disabled by default with PublishTrimmed"
3+
description: "Learn about the breaking change in .NET 10 where HTTP/3 support is disabled by default when PublishTrimmed or PublishAot is set to true."
4+
ms.date: 07/22/2025
5+
ai-usage: ai-assisted
6+
ms.custom: https://github.com/dotnet/docs/issues/47443
7+
---
8+
9+
# HTTP/3 support in System.Net.Http disabled by default with PublishTrimmed
10+
11+
Setting `PublishTrimmed` or `PublishAot` to `true` in the project disables HTTP/3 support in <xref:System.Net.Http> by default.
12+
13+
## Version introduced
14+
15+
.NET 10 Preview 6
16+
17+
## Previous behavior
18+
19+
Previously, HTTP/3 support was allowed, but might not have actually worked by default in environments where the msquic native library wasn't available. This resulted in HTTP/3 not actually working while the app carried all the code related to it.
20+
21+
## New behavior
22+
23+
Starting in .NET 10, HTTP/3 is disabled and the code for it isn't included when `PublishTrimmed` or `PublishAot` is set to `true`.
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+
Since making HTTP/3 work requires extra gestures and often doesn't work by default, the runtime no longer carries the code for it in trimmed or AOT-compiled applications.
32+
33+
## Recommended action
34+
35+
To enable HTTP/3 support in applications that use `PublishTrimmed` or `PublishAot`, set the `<Http3Support>` property to `true` in your project file:
36+
37+
```xml
38+
<PropertyGroup>
39+
...
40+
<PublishTrimmed>true</PublishTrimmed>
41+
<Http3Support>true</Http3Support>
42+
</PropertyGroup>
43+
```
44+
45+
## Affected APIs
46+
47+
None.
48+
49+
## See also
50+
51+
- [Trimming options](../../../deploying/trimming/trimming-options.md)

docs/core/compatibility/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ items:
6262
href: interop/10.0/search-assembly-directory.md
6363
- name: Networking
6464
items:
65+
- name: HTTP/3 support disabled by default with PublishTrimmed
66+
href: networking/10.0/http3-disabled-with-publishtrimmed.md
6567
- name: HttpClient/SslStream default certificate revocation check mode changed to Online
6668
href: networking/10.0/ssl-certificate-revocation-check-default.md
6769
- name: Streaming HTTP responses enabled by default in browser HTTP clients

docs/core/deploying/trimming/trimming-options.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ The SDK also makes it possible to disable debugger support using the property `D
6464

6565
Several feature areas of the framework libraries come with trimmer directives that make it possible to remove the code for disabled features.
6666

67-
| MSBuild property | Description |
68-
| - | - |
67+
| MSBuild property | Description |
68+
|--------------------------|-------------|
6969
| `AutoreleasePoolSupport` | When set to `false`, removes code that creates [autorelease pools](../../runtime-config/threading.md#autoreleasepool-for-managed-threads) on supported platforms. `false` is the default for the .NET SDK. |
70-
| `DebuggerSupport` | When set to `false`, removes code that enables better debugging experiences. This setting also [removes symbols](#remove-symbols). |
70+
| `DebuggerSupport` | When set to `false`, removes code that enables better debugging experiences. This setting also [removes symbols](#remove-symbols). |
7171
| `EnableUnsafeBinaryFormatterSerialization` | When set to `false`, removes BinaryFormatter serialization support. For more information, see [BinaryFormatter serialization methods are obsolete](../../compatibility/serialization/5.0/binaryformatter-serialization-obsolete.md) and [In-box BinaryFormatter implementation removed and always throws](../../compatibility/serialization/9.0/binaryformatter-removal.md). |
7272
| `EnableUnsafeUTF7Encoding` | When set to `false`, removes insecure UTF-7 encoding code. For more information, see [UTF-7 code paths are obsolete](../../compatibility/core-libraries/5.0/utf-7-code-paths-obsolete.md). |
7373
| `EventSourceSupport` | When set to `false`, removes EventSource-related code and logic. |

0 commit comments

Comments
 (0)