Prechádzať zdrojové kódy

WIP to get .NET 5 support for Rx

Claire Novotny 5 rokov pred
rodič
commit
08b6069b0f
19 zmenil súbory, kde vykonal 74 pridanie a 56 odobranie
  1. 0 1
      Rx.NET/Source/Directory.build.props
  2. 15 13
      Rx.NET/Source/Directory.build.targets
  3. 1 1
      Rx.NET/Source/facades/System.Reactive.Core/System.Reactive.Core.csproj
  4. 1 1
      Rx.NET/Source/facades/System.Reactive.Interfaces/System.Reactive.Interfaces.csproj
  5. 1 1
      Rx.NET/Source/facades/System.Reactive.Linq/System.Reactive.Linq.csproj
  6. 1 1
      Rx.NET/Source/facades/System.Reactive.PlatformServices/System.Reactive.PlatformServices.csproj
  7. 1 1
      Rx.NET/Source/facades/System.Reactive.Providers/System.Reactive.Providers.csproj
  8. 1 1
      Rx.NET/Source/facades/System.Reactive.Windows.Threading/System.Reactive.Windows.Threading.csproj
  9. 1 1
      Rx.NET/Source/facades/System.Reactive.WindowsRuntime/System.Reactive.WindowsRuntime.csproj
  10. 1 1
      Rx.NET/Source/src/Microsoft.Reactive.Testing/Microsoft.Reactive.Testing.csproj
  11. 1 1
      Rx.NET/Source/src/System.Reactive.Observable.Aliases/System.Reactive.Observable.Aliases.csproj
  12. 1 1
      Rx.NET/Source/src/System.Reactive/Internal/ReflectionUtils.cs
  13. 2 1
      Rx.NET/Source/src/System.Reactive/Platforms/UWP/Concurrency/CoreDispatcherScheduler.cs
  14. 11 5
      Rx.NET/Source/src/System.Reactive/Platforms/UWP/Linq/CoreDispatcherObservable.cs
  15. 15 13
      Rx.NET/Source/src/System.Reactive/System.Reactive.csproj
  16. 1 1
      Rx.NET/Source/src/System.Reactive/build/System.Reactive.targets
  17. 1 1
      Rx.NET/Source/tests/Tests.System.Reactive/DispatcherHelpers.cs
  18. 2 2
      Rx.NET/Source/tests/Tests.System.Reactive/Tests.System.Reactive.csproj
  19. 17 9
      azure-pipelines.rx.yml

+ 0 - 1
Rx.NET/Source/Directory.build.props

@@ -24,7 +24,6 @@
 
 
   <PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
   <PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
     <ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
     <ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
-    <Deterministic>true</Deterministic>
   </PropertyGroup>
   </PropertyGroup>
 
 
   <ItemGroup>
   <ItemGroup>

+ 15 - 13
Rx.NET/Source/Directory.build.targets

@@ -15,32 +15,34 @@
   <PropertyGroup>  
   <PropertyGroup>  
     <Product>$(AssemblyName) ($(TargetFramework))</Product>
     <Product>$(AssemblyName) ($(TargetFramework))</Product>
   </PropertyGroup>
   </PropertyGroup>
-
-  <PropertyGroup>
-    <DefineConstants>$(DefineConstants);HAS_WINRT</DefineConstants>
-  </PropertyGroup>
     
     
   <PropertyGroup Condition="'$(TargetFramework)' == 'net46'">
   <PropertyGroup Condition="'$(TargetFramework)' == 'net46'">
-    <DefineConstants>$(DefineConstants);HAS_WINFORMS;HAS_DISPATCHER;HAS_REMOTING;DESKTOPCLR</DefineConstants>
+    <DefineConstants>$(DefineConstants);HAS_WINFORMS;HAS_WINRT;HAS_DISPATCHER;HAS_REMOTING;DESKTOPCLR</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0'">
   <PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0'">
     <TargetPlatformVersion>10.0.17763.0</TargetPlatformVersion>
     <TargetPlatformVersion>10.0.17763.0</TargetPlatformVersion>
     <TargetPlatformMinVersion>10.0.15063.0</TargetPlatformMinVersion>
     <TargetPlatformMinVersion>10.0.15063.0</TargetPlatformMinVersion>
-    <DefineConstants>$(DefineConstants);NO_CODE_COVERAGE_ATTRIBUTE;NO_SERIALIZABLE;CRIPPLED_REFLECTION;NO_THREAD;NO_TRACE;WINDOWS</DefineConstants>
+    <DefineConstants>$(DefineConstants);HAS_WINRT;NO_CODE_COVERAGE_ATTRIBUTE;NO_SERIALIZABLE;CRIPPLED_REFLECTION;NO_THREAD;NO_TRACE;WINDOWS</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0.16299'">
   <PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0.16299'">
-    <DefineConstants>$(DefineConstants);WINDOWS</DefineConstants>
-    <TargetPlatformVersion>10.0.17763.0</TargetPlatformVersion>
+    <DefineConstants>$(DefineConstants);HAS_WINRT;WINDOWS</DefineConstants>
+    <TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netcoreapp2.1'">
   <PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'netcoreapp2.1'">
-    <DefineConstants>$(DefineConstants)</DefineConstants>
+    <DefineConstants>$(DefineConstants);HAS_WINRT</DefineConstants>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
+    <DefineConstants>$(DefineConstants);HAS_WINRT;HAS_WINFORMS;HAS_DISPATCHER;DESKTOPCLR</DefineConstants>
+  </PropertyGroup>
+  <PropertyGroup Condition="$(TargetFramework.StartsWith('net5.0-windows'))">
+    <DefineConstants>$(DefineConstants);HAS_TRACE;HAS_WINRT;PREFER_ASYNC;HAS_TPL46;NO_REMOTING;HAS_WINFORMS;HAS_DISPATCHER;DESKTOPCLR;WINDOWS</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
-  <PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
-    <DefineConstants>$(DefineConstants);HAS_WINFORMS;HAS_DISPATCHER;DESKTOPCLR</DefineConstants>
+  <PropertyGroup Condition="'$(TargetFramework)' == 'net5.0'">
+    <DefineConstants>$(DefineConstants);HAS_TRACE;PREFER_ASYNC;HAS_TPL46;NO_REMOTING</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
 
 
 
 
-  <ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp3.0'">
+  <ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp3.1'">
     <PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
     <PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
   </ItemGroup>
   </ItemGroup>
 
 
@@ -53,4 +55,4 @@
     </ItemGroup>
     </ItemGroup>
   </Target>
   </Target>
   
   
-</Project>
+</Project>

+ 1 - 1
Rx.NET/Source/facades/System.Reactive.Core/System.Reactive.Core.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="MSBuild.Sdk.Extras">
 <Project Sdk="MSBuild.Sdk.Extras">
 
 
   <PropertyGroup>
   <PropertyGroup>
-    <TargetFrameworks>net46;netstandard2.0;uap10.0</TargetFrameworks>
+    <TargetFrameworks>net46;netstandard2.0;uap10.0.16299</TargetFrameworks>
   </PropertyGroup>
   </PropertyGroup>
 
 
   <ItemGroup>
   <ItemGroup>

+ 1 - 1
Rx.NET/Source/facades/System.Reactive.Interfaces/System.Reactive.Interfaces.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="MSBuild.Sdk.Extras">
 <Project Sdk="MSBuild.Sdk.Extras">
 
 
   <PropertyGroup>
   <PropertyGroup>
-    <TargetFrameworks>net46;netstandard2.0;uap10.0</TargetFrameworks>
+    <TargetFrameworks>net46;netstandard2.0;uap10.0.16299</TargetFrameworks>
   </PropertyGroup>
   </PropertyGroup>
 
 
   <ItemGroup>
   <ItemGroup>

+ 1 - 1
Rx.NET/Source/facades/System.Reactive.Linq/System.Reactive.Linq.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="MSBuild.Sdk.Extras">
 <Project Sdk="MSBuild.Sdk.Extras">
 
 
   <PropertyGroup>
   <PropertyGroup>
-    <TargetFrameworks>net46;netstandard2.0;uap10.0</TargetFrameworks>
+    <TargetFrameworks>net46;netstandard2.0;uap10.0.16299</TargetFrameworks>
   </PropertyGroup>
   </PropertyGroup>
 
 
   <ItemGroup>
   <ItemGroup>

+ 1 - 1
Rx.NET/Source/facades/System.Reactive.PlatformServices/System.Reactive.PlatformServices.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="MSBuild.Sdk.Extras">
 <Project Sdk="MSBuild.Sdk.Extras">
 
 
   <PropertyGroup>
   <PropertyGroup>
-    <TargetFrameworks>net46;netstandard2.0;uap10.0</TargetFrameworks>
+    <TargetFrameworks>net46;netstandard2.0;uap10.0.16299</TargetFrameworks>
   </PropertyGroup>
   </PropertyGroup>
 
 
   <ItemGroup>
   <ItemGroup>

+ 1 - 1
Rx.NET/Source/facades/System.Reactive.Providers/System.Reactive.Providers.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="MSBuild.Sdk.Extras">
 <Project Sdk="MSBuild.Sdk.Extras">
 
 
   <PropertyGroup>
   <PropertyGroup>
-    <TargetFrameworks>net46;netstandard2.0;uap10.0</TargetFrameworks>
+    <TargetFrameworks>net46;netstandard2.0;uap10.0.16299</TargetFrameworks>
   </PropertyGroup>
   </PropertyGroup>
 
 
   <ItemGroup>
   <ItemGroup>

+ 1 - 1
Rx.NET/Source/facades/System.Reactive.Windows.Threading/System.Reactive.Windows.Threading.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="MSBuild.Sdk.Extras">
 <Project Sdk="MSBuild.Sdk.Extras">
 
 
   <PropertyGroup>
   <PropertyGroup>
-    <TargetFrameworks>net46;uap10.0</TargetFrameworks>
+    <TargetFrameworks>net46;uap10.0.16299</TargetFrameworks>
   </PropertyGroup>
   </PropertyGroup>
 
 
   <ItemGroup>
   <ItemGroup>

+ 1 - 1
Rx.NET/Source/facades/System.Reactive.WindowsRuntime/System.Reactive.WindowsRuntime.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="MSBuild.Sdk.Extras">
 <Project Sdk="MSBuild.Sdk.Extras">
 
 
   <PropertyGroup>
   <PropertyGroup>
-    <TargetFramework>uap10.0</TargetFramework>
+    <TargetFramework>uap10.0.16299</TargetFramework>
   </PropertyGroup>
   </PropertyGroup>
 
 
   <ItemGroup>
   <ItemGroup>

+ 1 - 1
Rx.NET/Source/src/Microsoft.Reactive.Testing/Microsoft.Reactive.Testing.csproj

@@ -1,6 +1,6 @@
 <Project Sdk="MSBuild.Sdk.Extras">
 <Project Sdk="MSBuild.Sdk.Extras">
   <PropertyGroup>
   <PropertyGroup>
-    <TargetFrameworks>netcoreapp3.0;net46;uap10.0;netstandard2.0</TargetFrameworks>
+    <TargetFrameworks>netcoreapp3.1;net46;uap10.0.16299;netstandard2.0;net5.0</TargetFrameworks>
     <CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
     <CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
     <Description>Reactive Extensions Testing Library containing interfaces and classes providing functionality to test applications and libraries built using Reactive Extensions.</Description>    
     <Description>Reactive Extensions Testing Library containing interfaces and classes providing functionality to test applications and libraries built using Reactive Extensions.</Description>    
     <AssemblyTitle>Microsoft.Reactive.Testing - Testing Helper Library</AssemblyTitle>    
     <AssemblyTitle>Microsoft.Reactive.Testing - Testing Helper Library</AssemblyTitle>    

+ 1 - 1
Rx.NET/Source/src/System.Reactive.Observable.Aliases/System.Reactive.Observable.Aliases.csproj

@@ -1,6 +1,6 @@
 <Project Sdk="MSBuild.Sdk.Extras">
 <Project Sdk="MSBuild.Sdk.Extras">
   <PropertyGroup>
   <PropertyGroup>
-    <TargetFrameworks>netstandard2.0;net46;uap10.0</TargetFrameworks>    
+    <TargetFrameworks>netstandard2.0;net46;uap10.0.16299;net5.0</TargetFrameworks>    
     <Title>Reactive Extensions - Aliases</Title>    
     <Title>Reactive Extensions - Aliases</Title>    
     <CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>    
     <CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>    
     <PackageTags>Rx;Reactive;Extensions;Observable;LINQ;Events</PackageTags>
     <PackageTags>Rx;Reactive;Extensions;Observable;LINQ;Events</PackageTags>

+ 1 - 1
Rx.NET/Source/src/System.Reactive/Internal/ReflectionUtils.cs

@@ -71,7 +71,7 @@ namespace System.Reactive
 
 
             isWinRT = false;
             isWinRT = false;
 
 
-#if HAS_WINRT
+#if HAS_WINRT && !NET5_0_WINDOWS10_0_19041
             if (addMethod.ReturnType == typeof(EventRegistrationToken))
             if (addMethod.ReturnType == typeof(EventRegistrationToken))
             {
             {
                 isWinRT = true;
                 isWinRT = true;

+ 2 - 1
Rx.NET/Source/src/System.Reactive/Platforms/UWP/Concurrency/CoreDispatcherScheduler.cs

@@ -7,8 +7,9 @@ using System.Reactive.Disposables;
 using System.Runtime.ExceptionServices;
 using System.Runtime.ExceptionServices;
 using System.Threading;
 using System.Threading;
 using Windows.UI.Core;
 using Windows.UI.Core;
+#if !NET5_0_WINDOWS10_0_19041
 using Windows.UI.Xaml;
 using Windows.UI.Xaml;
-
+#endif
 namespace System.Reactive.Concurrency
 namespace System.Reactive.Concurrency
 {
 {
     /// <summary>
     /// <summary>

+ 11 - 5
Rx.NET/Source/src/System.Reactive/Platforms/UWP/Linq/CoreDispatcherObservable.cs

@@ -5,7 +5,10 @@
 #if WINDOWS
 #if WINDOWS
 using System.Reactive.Concurrency;
 using System.Reactive.Concurrency;
 using Windows.UI.Core;
 using Windows.UI.Core;
+
+#if !NET5_0_WINDOWS10_0_19041
 using Windows.UI.Xaml;
 using Windows.UI.Xaml;
+#endif
 
 
 namespace System.Reactive.Linq
 namespace System.Reactive.Linq
 {
 {
@@ -64,6 +67,7 @@ namespace System.Reactive.Linq
             return Synchronization.ObserveOn(source, new CoreDispatcherScheduler(dispatcher, priority));
             return Synchronization.ObserveOn(source, new CoreDispatcherScheduler(dispatcher, priority));
         }
         }
 
 
+        #if !NET5_0_WINDOWS10_0_19041
         /// <summary>
         /// <summary>
         /// Wraps the source sequence in order to run its observer callbacks on the dispatcher associated with the specified object.
         /// Wraps the source sequence in order to run its observer callbacks on the dispatcher associated with the specified object.
         /// </summary>
         /// </summary>
@@ -110,7 +114,7 @@ namespace System.Reactive.Linq
 
 
             return Synchronization.ObserveOn(source, new CoreDispatcherScheduler(dependencyObject.Dispatcher, priority));
             return Synchronization.ObserveOn(source, new CoreDispatcherScheduler(dependencyObject.Dispatcher, priority));
         }
         }
-
+#endif
         /// <summary>
         /// <summary>
         /// Wraps the source sequence in order to run its observer callbacks on the dispatcher associated with the current window.
         /// Wraps the source sequence in order to run its observer callbacks on the dispatcher associated with the current window.
         /// </summary>
         /// </summary>
@@ -146,9 +150,9 @@ namespace System.Reactive.Linq
             return Synchronization.ObserveOn(source, new CoreDispatcherScheduler(CoreDispatcherScheduler.Current.Dispatcher, priority));
             return Synchronization.ObserveOn(source, new CoreDispatcherScheduler(CoreDispatcherScheduler.Current.Dispatcher, priority));
         }
         }
 
 
-        #endregion
+#endregion
 
 
-        #region SubscribeOn[Dispatcher]
+#region SubscribeOn[Dispatcher]
 
 
         /// <summary>
         /// <summary>
         /// Wraps the source sequence in order to run its subscription and unsubscription logic on the specified dispatcher.
         /// Wraps the source sequence in order to run its subscription and unsubscription logic on the specified dispatcher.
@@ -205,6 +209,7 @@ namespace System.Reactive.Linq
             return Synchronization.SubscribeOn(source, new CoreDispatcherScheduler(dispatcher, priority));
             return Synchronization.SubscribeOn(source, new CoreDispatcherScheduler(dispatcher, priority));
         }
         }
 
 
+#if !NET5_0_WINDOWS10_0_19041
         /// <summary>
         /// <summary>
         /// Wraps the source sequence in order to run its subscription and unsubscription logic on the dispatcher associated with the specified object.
         /// Wraps the source sequence in order to run its subscription and unsubscription logic on the dispatcher associated with the specified object.
         /// </summary>
         /// </summary>
@@ -259,6 +264,7 @@ namespace System.Reactive.Linq
 
 
             return Synchronization.SubscribeOn(source, new CoreDispatcherScheduler(dependencyObject.Dispatcher, priority));
             return Synchronization.SubscribeOn(source, new CoreDispatcherScheduler(dependencyObject.Dispatcher, priority));
         }
         }
+#endif
 
 
         /// <summary>
         /// <summary>
         /// Wraps the source sequence in order to run its subscription and unsubscription logic on the dispatcher associated with the current window.
         /// Wraps the source sequence in order to run its subscription and unsubscription logic on the dispatcher associated with the current window.
@@ -303,7 +309,7 @@ namespace System.Reactive.Linq
             return Synchronization.SubscribeOn(source, new CoreDispatcherScheduler(CoreDispatcherScheduler.Current.Dispatcher, priority));
             return Synchronization.SubscribeOn(source, new CoreDispatcherScheduler(CoreDispatcherScheduler.Current.Dispatcher, priority));
         }
         }
 
 
-        #endregion
+#endregion
     }
     }
 }
 }
-#endif
+#endif

+ 15 - 13
Rx.NET/Source/src/System.Reactive/System.Reactive.csproj

@@ -1,18 +1,18 @@
 <Project Sdk="MSBuild.Sdk.Extras">
 <Project Sdk="MSBuild.Sdk.Extras">
   <PropertyGroup>
   <PropertyGroup>
-    <TargetFrameworks>netcoreapp3.0;netstandard2.0;net46;uap10.0;uap10.0.16299</TargetFrameworks>
+    <TargetFrameworks>netcoreapp3.1;netstandard2.0;net46;uap10.0.16299;net5.0;net5.0-windows10.0.19041</TargetFrameworks>
     <CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
     <CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
     <PackageTags>Rx;Reactive;Extensions;Observable;LINQ;Events</PackageTags>
     <PackageTags>Rx;Reactive;Extensions;Observable;LINQ;Events</PackageTags>
     <Description>Reactive Extensions (Rx) for .NET</Description>
     <Description>Reactive Extensions (Rx) for .NET</Description>
   </PropertyGroup>
   </PropertyGroup>
 
 
-  <PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
+  <PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
     <UseWPF>true</UseWPF>
     <UseWPF>true</UseWPF>
     <UseWindowsForms>true</UseWindowsForms>
     <UseWindowsForms>true</UseWindowsForms>
     <IncludeBuildOutput>false</IncludeBuildOutput>
     <IncludeBuildOutput>false</IncludeBuildOutput>
   </PropertyGroup>
   </PropertyGroup>
 
 
-  <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
+  <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
     <FrameworkReference Update="Microsoft.WindowsDesktop.App" PrivateAssets="all" />
     <FrameworkReference Update="Microsoft.WindowsDesktop.App" PrivateAssets="all" />
   </ItemGroup>
   </ItemGroup>
 
 
@@ -39,12 +39,12 @@
     <PackageReference Include="System.Dynamic.Runtime" Version="4.0.11" />
     <PackageReference Include="System.Dynamic.Runtime" Version="4.0.11" />
     <PackageReference Include="System.Linq.Queryable" Version="4.0.1" />
     <PackageReference Include="System.Linq.Queryable" Version="4.0.1" />
   </ItemGroup>
   </ItemGroup>
-  <ItemGroup Condition=" $(TargetFramework.StartsWith('uap10.0')) ">
+  <ItemGroup Condition=" $(TargetFramework.StartsWith('uap10.0')) or $(TargetFramework.StartsWith('net5.0-windows'))">
     <Compile Include="Platforms\UWP\**\*.cs" />
     <Compile Include="Platforms\UWP\**\*.cs" />
   </ItemGroup>
   </ItemGroup>
 
 
   <!-- Windows includes for Desktop and UWP -->
   <!-- Windows includes for Desktop and UWP -->
-  <ItemGroup Condition=" '$(TargetFramework)' == 'net46' or $(TargetFramework.StartsWith('uap10.0')) or '$(TargetFramework)' == 'netcoreapp3.0'">
+  <ItemGroup Condition=" '$(TargetFramework)' == 'net46' or $(TargetFramework.StartsWith('uap10.0')) or '$(TargetFramework)' == 'netcoreapp3.1' or $(TargetFramework.StartsWith('net5.0-windows'))">
     <Compile Include="Platforms\Windows\**\*.cs" />
     <Compile Include="Platforms\Windows\**\*.cs" />
     <EmbeddedResource Include="Platforms\Windows\**\*.resx" />
     <EmbeddedResource Include="Platforms\Windows\**\*.resx" />
   </ItemGroup>
   </ItemGroup>
@@ -57,7 +57,7 @@
     <Reference Include="WindowsBase" />
     <Reference Include="WindowsBase" />
   </ItemGroup>
   </ItemGroup>
 
 
-  <ItemGroup Condition=" '$(TargetFramework)' == 'net46' or '$(TargetFramework)' == 'netcoreapp3.0'">
+  <ItemGroup Condition=" '$(TargetFramework)' == 'net46' or '$(TargetFramework)' == 'netcoreapp3.1'">
     <Compile Include="Platforms\Desktop\**\*.cs" />
     <Compile Include="Platforms\Desktop\**\*.cs" />
   </ItemGroup>
   </ItemGroup>
 
 
@@ -153,27 +153,29 @@
   </PropertyGroup>
   </PropertyGroup>
 
 
   <!-- We remove the output from the nuget so it doesn't wind up in the \lib folder -->
   <!-- We remove the output from the nuget so it doesn't wind up in the \lib folder -->
-  <Target Name="RemoveNetCoreApp3FromNuGet" DependsOnTargets="BuiltProjectOutputGroup;DocumentationProjectOutputGroup" Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
+  <Target Name="RemoveNetCoreApp3FromNuGet" DependsOnTargets="BuiltProjectOutputGroup;DocumentationProjectOutputGroup" Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
     <ItemGroup>
     <ItemGroup>
       <!-- Before clearing the output groups, add them to None for packing -->
       <!-- Before clearing the output groups, add them to None for packing -->
-      <ItemsToAddToNuGet Include="@(BuiltProjectOutputGroupOutput);@(DocumentationProjectOutputGroupOutput)" PackagePath="build\netcoreapp3.0" />
+      <ItemsToAddToNuGet Include="@(BuiltProjectOutputGroupOutput);@(DocumentationProjectOutputGroupOutput)" PackagePath="build\netcoreapp3.1" />
 
 
       <BuiltProjectOutputGroupOutput Remove="@(BuiltProjectOutputGroupOutput)" />
       <BuiltProjectOutputGroupOutput Remove="@(BuiltProjectOutputGroupOutput)" />
       <DocumentationProjectOutputGroupOutput Remove="@(DocumentationProjectOutputGroupOutput)" />
       <DocumentationProjectOutputGroupOutput Remove="@(DocumentationProjectOutputGroupOutput)" />
     </ItemGroup>
     </ItemGroup>
   </Target>
   </Target>
 
 
-  <Target Name="AddNetCore3ToNuGet" Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
+  <Target Name="AddNetCore3ToNuGet" Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
     <ItemGroup>
     <ItemGroup>
       <!-- Add the removed build output to the build\netcoreapp3.0 folder -->
       <!-- Add the removed build output to the build\netcoreapp3.0 folder -->
-      <TfmSpecificPackageFileWithRecursiveDir Include="@(ItemsToAddToNuGet)" PackagePath="build\netcoreapp3.0" />
+      <TfmSpecificPackageFileWithRecursiveDir Include="@(ItemsToAddToNuGet)" PackagePath="build\netcoreapp3.1" />
     </ItemGroup>
     </ItemGroup>
   </Target>
   </Target>
 
 
   <ItemGroup>
   <ItemGroup>
-    <None Include="build\_._" PackagePath="lib\netcoreapp3.0" Pack="true" />
-    <None Include="build\System.Reactive.targets" PackagePath="buildTransitive\netcoreapp3.0" Pack="true" />
-    <None Include="build\System.Reactive.targets" PackagePath="build\netcoreapp3.0" Pack="true" />
+    <None Include="build\_._" PackagePath="lib\netcoreapp3.1" Pack="true" />
+    <None Include="build\_._" PackagePath="buildTransitive\net5.0" Pack="true" />
+    <None Include="build\_._" PackagePath="buildTransitive\net5.0" Pack="true" />
+    <None Include="build\System.Reactive.targets" PackagePath="buildTransitive\netcoreapp3.1" Pack="true" />
+    <None Include="build\System.Reactive.targets" PackagePath="build\netcoreapp3.1" Pack="true" />
   </ItemGroup>
   </ItemGroup>
 
 
   <ItemGroup>
   <ItemGroup>

+ 1 - 1
Rx.NET/Source/src/System.Reactive/build/System.Reactive.targets

@@ -4,7 +4,7 @@
     <UseWindowsRxVersion Condition="'$(UseWindowsRxVersion)' == '' " >false</UseWindowsRxVersion>
     <UseWindowsRxVersion Condition="'$(UseWindowsRxVersion)' == '' " >false</UseWindowsRxVersion>
   </PropertyGroup>
   </PropertyGroup>
   <ItemGroup>
   <ItemGroup>
-    <Reference Condition="'$(UseWindowsRxVersion)' == 'true' "  Include="$(MSBuildThisFileDirectory)..\..\build\netcoreapp3.0\System.Reactive.dll" />
+    <Reference Condition="'$(UseWindowsRxVersion)' == 'true' "  Include="$(MSBuildThisFileDirectory)..\..\build\netcoreapp3.1\System.Reactive.dll" />
     <Reference Condition="'$(UseWindowsRxVersion)' != 'true' "  Include="$(MSBuildThisFileDirectory)..\..\lib\netstandard2.0\System.Reactive.dll" />
     <Reference Condition="'$(UseWindowsRxVersion)' != 'true' "  Include="$(MSBuildThisFileDirectory)..\..\lib\netstandard2.0\System.Reactive.dll" />
 
 
     <FrameworkReference Include="Microsoft.WindowsDesktop.App" Condition="'$(UseWindowsRxVersion)' == 'true' and !@(FrameworkReference->AnyHaveMetadataValue('Identity', 'Microsoft.WindowsDesktop.App'))" />
     <FrameworkReference Include="Microsoft.WindowsDesktop.App" Condition="'$(UseWindowsRxVersion)' == 'true' and !@(FrameworkReference->AnyHaveMetadataValue('Identity', 'Microsoft.WindowsDesktop.App'))" />

+ 1 - 1
Rx.NET/Source/tests/Tests.System.Reactive/DispatcherHelpers.cs

@@ -2,7 +2,7 @@
 // The .NET Foundation licenses this file to you under the MIT License.
 // The .NET Foundation licenses this file to you under the MIT License.
 // See the LICENSE file in the project root for more information. 
 // See the LICENSE file in the project root for more information. 
 
 
-#if NETCOREAPP2_1 || NET46 || NETCOREAPP3_0
+#if NETCOREAPP2_1 || NET46 || NETCOREAPP3_1 || NET5_0_WINDOWS10_0_19041
 using System.Threading;
 using System.Threading;
 #endif
 #endif
 #if HAS_DISPATCHER
 #if HAS_DISPATCHER

+ 2 - 2
Rx.NET/Source/tests/Tests.System.Reactive/Tests.System.Reactive.csproj

@@ -1,10 +1,10 @@
 <Project Sdk="MSBuild.Sdk.Extras">
 <Project Sdk="MSBuild.Sdk.Extras">
   <PropertyGroup>
   <PropertyGroup>
-    <TargetFrameworks>netcoreapp3.0;net46;netcoreapp2.1</TargetFrameworks>
+    <TargetFrameworks>netcoreapp3.1;net46;netcoreapp2.1;net5.0;net5.0-windows10.0.19041</TargetFrameworks>
     <NoWarn>$(NoWarn);CS0618</NoWarn>
     <NoWarn>$(NoWarn);CS0618</NoWarn>
   </PropertyGroup>
   </PropertyGroup>
 
 
-  <PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0' or '$(TargetFramework)' == 'net46'">
+  <PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net46'">
     <UseWPF>true</UseWPF>
     <UseWPF>true</UseWPF>
     <UseWindowsForms>true</UseWindowsForms>
     <UseWindowsForms>true</UseWindowsForms>
   </PropertyGroup>
   </PropertyGroup>

+ 17 - 9
azure-pipelines.rx.yml

@@ -25,7 +25,7 @@ stages:
   jobs:
   jobs:
   - job: Build
   - job: Build
     pool:
     pool:
-      vmImage: windows-2019
+      vmImage: windows-latest
 
 
     variables:
     variables:
       BuildConfiguration: Release
       BuildConfiguration: Release
@@ -34,9 +34,10 @@ stages:
 
 
     steps:
     steps:
     - task: UseDotNet@2
     - task: UseDotNet@2
-      displayName: Use .NET Core 3.1.x SDK
+      displayName: Use .NET Core 5.0.x SDK
       inputs:
       inputs:
-        version: 3.1.x
+        version: 5.0.x
+        includePreviewVersions: true
         performMultiLevelLookup: true
         performMultiLevelLookup: true
 
 
     - task: DotNetCoreCLI@2
     - task: DotNetCoreCLI@2
@@ -127,7 +128,13 @@ stages:
     steps:
     steps:
     - task: UseDotNet@2
     - task: UseDotNet@2
       inputs:
       inputs:
-        version: '3.0.x'
+        version: 5.0.x
+        includePreviewVersions: true
+
+    - task: UseDotNet@2
+      inputs:
+        version: '3.1.x'
+        packageType: runtime
 
 
     - task: UseDotNet@2
     - task: UseDotNet@2
       inputs:
       inputs:
@@ -178,8 +185,8 @@ stages:
       inputs:
       inputs:
         command: test
         command: test
         projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LinuxTests/LinuxTests.csproj
         projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LinuxTests/LinuxTests.csproj
-        arguments: -c $(BuildConfiguration) -f netcoreapp3.0
-      displayName: Run 3.0 Tests on Linux
+        arguments: -c $(BuildConfiguration) -f netcoreapp3.1
+      displayName: Run 3.1 Tests on Linux
 
 
     - task: DotNetCoreCLI@2
     - task: DotNetCoreCLI@2
       inputs:
       inputs:
@@ -191,7 +198,7 @@ stages:
   - job: Integration_WindowsDesktop_Tests
   - job: Integration_WindowsDesktop_Tests
     dependsOn: Build
     dependsOn: Build
     pool:
     pool:
-      vmImage: windows-2019
+      vmImage: windows-latest
 
 
     variables:
     variables:
       BuildConfiguration: Release
       BuildConfiguration: Release
@@ -201,7 +208,8 @@ stages:
     steps:
     steps:
     - task: UseDotNet@2
     - task: UseDotNet@2
       inputs:
       inputs:
-        version: '3.0.x'
+        version: 5.0.x
+        includePreviewVersions: true
         performMultiLevelLookup: true
         performMultiLevelLookup: true
 
 
     - task: DotNetCoreCLI@2
     - task: DotNetCoreCLI@2
@@ -249,7 +257,7 @@ stages:
         command: test
         command: test
         projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/WindowsDesktopTests/WindowsDesktopTests.csproj
         projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/WindowsDesktopTests/WindowsDesktopTests.csproj
         arguments: -c $(BuildConfiguration) --filter "SkipCI!=true"
         arguments: -c $(BuildConfiguration) --filter "SkipCI!=true"
-      displayName: Run 3.0 Tests on WindowDesktop
+      displayName: Run 3.1 Tests on WindowDesktop
 
 
 - stage: CodeSign
 - stage: CodeSign
   condition: and(succeeded('Build'), not(eq(variables['build.reason'], 'PullRequest')))
   condition: and(succeeded('Build'), not(eq(variables['build.reason'], 'PullRequest')))