Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/core/compatibility/10.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af

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

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: "Breaking change - HTTP/3 support in System.Net.Http disabled by default with PublishTrimmed"
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."
ms.date: 07/22/2025
ai-usage: ai-assisted
ms.custom: https://github.com/dotnet/docs/issues/47443
---

# HTTP/3 support in System.Net.Http disabled by default with PublishTrimmed

Setting `PublishTrimmed` or `PublishAot` to `true` in the project disables HTTP/3 support in <xref:System.Net.Http> by default.

## Version introduced

.NET 10 Preview 6

## Previous behavior

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.

## New behavior

Starting in .NET 10, HTTP/3 is disabled and the code for it isn't included when `PublishTrimmed` or `PublishAot` is set to `true`.

## Type of breaking change

This change can affect [source compatibility](../../categories.md#source-compatibility).

## Reason for change

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.

## Recommended action

To enable HTTP/3 support in applications that use `PublishTrimmed` or `PublishAot`, set the `<Http3Support>` property to `true` in your project file:

```xml
<PropertyGroup>
...
<PublishTrimmed>true</PublishTrimmed>
<Http3Support>true</Http3Support>
</PropertyGroup>
```

## Affected APIs

None.

## See also

- [Trimming options](../../../deploying/trimming/trimming-options.md)
2 changes: 2 additions & 0 deletions docs/core/compatibility/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ items:
href: interop/10.0/search-assembly-directory.md
- name: Networking
items:
- name: HTTP/3 support disabled by default with PublishTrimmed
href: networking/10.0/http3-disabled-with-publishtrimmed.md
- name: HttpClient/SslStream default certificate revocation check mode changed to Online
href: networking/10.0/ssl-certificate-revocation-check-default.md
- name: Streaming HTTP responses enabled by default in browser HTTP clients
Expand Down
6 changes: 3 additions & 3 deletions docs/core/deploying/trimming/trimming-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ The SDK also makes it possible to disable debugger support using the property `D

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

| MSBuild property | Description |
| - | - |
| MSBuild property | Description |
|--------------------------|-------------|
| `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. |
| `DebuggerSupport` | When set to `false`, removes code that enables better debugging experiences. This setting also [removes symbols](#remove-symbols). |
| `DebuggerSupport` | When set to `false`, removes code that enables better debugging experiences. This setting also [removes symbols](#remove-symbols). |
| `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). |
| `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). |
| `EventSourceSupport` | When set to `false`, removes EventSource-related code and logic. |
Expand Down