diff --git a/src/libraries/System.Net.Quic/NuGet.config b/src/libraries/System.Net.Quic/NuGet.config new file mode 100644 index 0000000000000..1fd4b3a3cd7fd --- /dev/null +++ b/src/libraries/System.Net.Quic/NuGet.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/libraries/System.Net.Quic/src/System.Net.Quic.csproj b/src/libraries/System.Net.Quic/src/System.Net.Quic.csproj index 5cd2d1f734110..44471280936e2 100644 --- a/src/libraries/System.Net.Quic/src/System.Net.Quic.csproj +++ b/src/libraries/System.Net.Quic/src/System.Net.Quic.csproj @@ -27,7 +27,7 @@ - + @@ -89,18 +89,4 @@ - - - PreserveNewest - PreserveNewest - - - PreserveNewest - PreserveNewest - - - PreserveNewest - PreserveNewest - - diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/MsQuicApi.cs b/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/MsQuicApi.cs index 653e16a4ad17a..9b03ee6c4ba87 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/MsQuicApi.cs +++ b/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/MsQuicApi.cs @@ -26,12 +26,12 @@ private unsafe MsQuicApi() uint status = Interop.MsQuic.MsQuicOpen(version: 1, out registration); if (!MsQuicStatusHelper.SuccessfulStatusCode(status)) { - throw new NotSupportedException(SR.net_quic_notsupported); + throw new NotSupportedException($"status:{status}{SR.net_quic_notsupported}"); } } - catch (DllNotFoundException) + catch (DllNotFoundException ex) { - throw new NotSupportedException(SR.net_quic_notsupported); + throw new NotSupportedException($"{ex.Message}{SR.net_quic_notsupported}"); } MsQuicNativeMethods.NativeApi nativeRegistration = *registration; @@ -141,13 +141,13 @@ static MsQuicApi() // - Otherwise, dial this in to reflect actual minimum requirements and add some sort of platform // error code mapping when creating exceptions. - OperatingSystem ver = Environment.OSVersion; + // OperatingSystem ver = Environment.OSVersion; - if (ver.Platform == PlatformID.Win32NT && ver.Version < new Version(10, 0, 19041, 0)) - { - IsQuicSupported = false; - return; - } + // if (ver.Platform == PlatformID.Win32NT && ver.Version < new Version(10, 0, 19041, 0)) + // { + // IsQuicSupported = false; + // return; + // } // TODO: try to initialize TLS 1.3 in SslStream. diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/MsQuicSession.cs b/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/MsQuicSession.cs index 89dd99f73c3e9..80b7f2c3d011d 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/MsQuicSession.cs +++ b/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/MsQuicSession.cs @@ -12,10 +12,10 @@ internal sealed class MsQuicSession : IDisposable internal MsQuicSession() { - if (!MsQuicApi.IsQuicSupported) - { - throw new NotSupportedException(SR.net_quic_notsupported); - } + //if (!MsQuicApi.IsQuicSupported) + //{ + // throw new NotSupportedException(SR.net_quic_notsupported); + //} } public IntPtr ConnectionOpen(QuicClientConnectionOptions options) diff --git a/src/libraries/System.Net.Quic/tests/FunctionalTests/MsQuicTests.cs b/src/libraries/System.Net.Quic/tests/FunctionalTests/MsQuicTests.cs index 7599fbb59ea0e..d939fac101039 100644 --- a/src/libraries/System.Net.Quic/tests/FunctionalTests/MsQuicTests.cs +++ b/src/libraries/System.Net.Quic/tests/FunctionalTests/MsQuicTests.cs @@ -13,7 +13,6 @@ namespace System.Net.Quic.Tests { - [ConditionalClass(typeof(QuicConnection), nameof(QuicConnection.IsQuicSupported))] public class MsQuicTests : MsQuicTestBase { private static ReadOnlyMemory s_data = Encoding.UTF8.GetBytes("Hello world!"); diff --git a/src/libraries/System.Net.Quic/tests/FunctionalTests/System.Net.Quic.Tests.csproj b/src/libraries/System.Net.Quic/tests/FunctionalTests/System.Net.Quic.Tests.csproj index 6f25835ecbbc5..0e6772727119b 100644 --- a/src/libraries/System.Net.Quic/tests/FunctionalTests/System.Net.Quic.Tests.csproj +++ b/src/libraries/System.Net.Quic/tests/FunctionalTests/System.Net.Quic.Tests.csproj @@ -14,4 +14,10 @@ Common\System\Threading\Tasks\TaskTimeoutExtensions.cs + + + + + + \ No newline at end of file