Description
I have a .NET 10 (same behavior on .NET 11) application, console app with the following csproj:
<PropertyGroup>
<Http3Support>true</Http3Support>
</PropertyGroup>
When published:
dotnet publish MyApp.csproj --configuration Release --self-contained --runtime win-x64 -p:PublishSingleFile=true --framework net10.0
It seems HTTP/3 requests with the HttpClient fails:
Request Error System.Net.Http.HttpRequestException: Requesting HTTP version 3.0 with version policy RequestVersionExact while unable to establish HTTP/3 connection.
at System.Net.Http.HttpConnectionPool.ThrowGetVersionException(HttpRequestMessage request, Int32 desiredVersion, Exception inner)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.SocketsHttpHandler.<SendAsync>g__CreateHandlerAndSendAsync|115_0(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
Reproduction Steps
Please see the steps above.
Expected behavior
HTTP/3 requests succeeds the same way as without the PublishSingleFile flag.
Actual behavior
Request Error System.Net.Http.HttpRequestException: Requesting HTTP version 3.0 with version policy
Regression?
No response
Known Workarounds
No known workarounds. It works if I copy the msquic.dll next to it, but this is not a good way to distribute an application.
Configuration
.NET SDK:
Version: 11.0.100-preview.7.26381.103
Commit: e2c1e00b3d
Workload version: 11.0.100-manifests.2ce71a7f
MSBuild version: 18.10.0-1.26381.103+e2c1e00b3
Runtime Environment:
OS Name: Windows
OS Version: 10.0.26200
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\11.0.100-preview.7.26381.103
.NET workloads installed:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
No workload sets are installed. Run "dotnet workload restore" to install a workload set.
Host:
Version: 11.0.0-preview.7.26381.103
Architecture: x64
Commit: e2c1e00b3d
.NET SDKs installed:
10.0.400 [C:\Program Files\dotnet\sdk]
11.0.100-preview.7.26381.103 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 11.0.0-preview.7.26381.103 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 11.0.0-preview.7.26381.103 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.30 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.19 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 10.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 11.0.0-preview.7.26381.103 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
Other information
No response
Description
I have a .NET 10 (same behavior on .NET 11) application, console app with the following csproj:
When published:
dotnet publish MyApp.csproj --configuration Release --self-contained --runtime win-x64 -p:PublishSingleFile=true --framework net10.0It seems HTTP/3 requests with the HttpClient fails:
Reproduction Steps
Please see the steps above.
Expected behavior
HTTP/3 requests succeeds the same way as without the
PublishSingleFileflag.Actual behavior
Request Error System.Net.Http.HttpRequestException: Requesting HTTP version 3.0 with version policy
Regression?
No response
Known Workarounds
No known workarounds. It works if I copy the msquic.dll next to it, but this is not a good way to distribute an application.
Configuration
Other information
No response