Skip to content

Commit 53b18f9

Browse files
Add feature switch to control HTTP3 support (#49564)
1 parent af913ff commit 53b18f9

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,11 @@ Copyright (c) .NET Foundation. All rights reserved.
623623
Value="$(_UseManagedNtlm)"
624624
Trim="true" />
625625

626+
<RuntimeHostConfigurationOption Include="System.Net.SocketsHttpHandler.Http3Support"
627+
Condition="'$(Http3Support)' != ''"
628+
Value="$(Http3Support)"
629+
Trim="true" />
630+
626631
<RuntimeHostConfigurationOption Include="System.Reflection.Metadata.MetadataUpdater.IsSupported"
627632
Condition="'$(MetadataUpdaterSupport)' != ''"
628633
Value="$(MetadataUpdaterSupport)"

test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAProjectWithAllFeatures.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ public void It_publishes_the_project_correctly(string targetFramework, string[]
8080
""System.Net.Http.EnableActivityPropagation"": false,
8181
""System.Net.Http.UseNativeHttpHandler"": true,
8282
""System.Net.Security.UseManagedNtlm"": true,
83+
""System.Net.SocketsHttpHandler.Http3Support"": false,
8384
""System.Reflection.Metadata.MetadataUpdater.IsSupported"": false,
8485
""System.Reflection.NullabilityInfoContext.IsSupported"": false,
8586
""System.Resources.ResourceManager.AllowCustomResourceTypes"": false,

test/TestAssets/TestProjects/KitchenSink/TestApp/TestApp.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<HttpActivityPropagationSupport>false</HttpActivityPropagationSupport>
3131
<UseNativeHttpHandler>true</UseNativeHttpHandler>
3232
<_UseManagedNtlm>true</_UseManagedNtlm>
33+
<Http3Support>false</Http3Support>
3334
<MetadataUpdaterSupport>false</MetadataUpdaterSupport>
3435
<NullabilityInfoContextSupport>false</NullabilityInfoContextSupport>
3536
<CustomResourceTypesSupport>false</CustomResourceTypesSupport>

0 commit comments

Comments
 (0)