Fix conditions to bin place msquic.dll for Windows builds. (#81490)
authorMarie Píchová <11718369+ManickaP@users.noreply.github.com>
Wed, 1 Feb 2023 20:21:00 +0000 (21:21 +0100)
committerGitHub <noreply@github.com>
Wed, 1 Feb 2023 20:21:00 +0000 (12:21 -0800)
src/libraries/System.Net.Quic/src/System.Net.Quic.csproj
src/libraries/System.Net.Quic/tests/FunctionalTests/MsQuicPlatformDetectionTests.cs

index 66018e4..a7ef3b5 100644 (file)
   <!-- Support for deploying msquic on Windows -->
   <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows' and
                         '$(TargetOS)' == 'windows' and
-                        '$(UseQuicTransportPackage)' == 'true' and
                         '$(DotNetBuildFromSource)' != 'true'">
     <BinPlaceDir Include="$(MicrosoftNetCoreAppRuntimePackNativeDir)" ItemName="NativeBinPlaceItem" />
     <BinPlaceDir Include="$(NetCoreAppCurrentTestHostSharedFrameworkPath)" ItemName="NativeBinPlaceItem" />
index 2d0bc54..1fbc8ec 100644 (file)
@@ -19,5 +19,12 @@ namespace System.Net.Quic.Tests
             Assert.ThrowsAsync<PlatformNotSupportedException>(async () => await CreateQuicListener());
             Assert.ThrowsAsync<PlatformNotSupportedException>(async () => await CreateQuicConnection(new IPEndPoint(IPAddress.Loopback, 0)));
         }
+
+        [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsWindows), nameof(PlatformDetection.SupportsTls13))]
+        public void SupportedWindowsPlatforms_IsSupportedIsTrue()
+        {
+            Assert.True(QuicListener.IsSupported);
+            Assert.True(QuicConnection.IsSupported);
+        }
     }
 }