Переглянути джерело

Replace net6.0 with net8.0

Ian Griffiths 7 місяців тому
батько
коміт
536a7cf35b

+ 3 - 3
Rx.NET/Source/Directory.build.targets

@@ -15,10 +15,10 @@
   <PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
     <DefineConstants>$(DefineConstants);HAS_WINRT;NO_NULLABLE_ATTRIBUTES</DefineConstants>
   </PropertyGroup>
-  <PropertyGroup Condition="$(TargetFramework.StartsWith('net6.0')) or $(TargetFramework.StartsWith('net7.0')) or $(TargetFramework.StartsWith('net8.0'))">
+  <PropertyGroup Condition="$(TargetFramework.StartsWith('net8.0')) or $(TargetFramework.StartsWith('net9.0'))">
     <DefineConstants>$(DefineConstants);HAS_TRIMMABILITY_ATTRIBUTES</DefineConstants>
   </PropertyGroup>
-  <PropertyGroup Condition="$(TargetFramework.StartsWith('net6.0-windows')) or $(TargetFramework.StartsWith('net8.0-windows')) or $(TargetFramework.StartsWith('net9.0-windows'))">
+  <PropertyGroup Condition="$(TargetFramework.StartsWith('net8.0-windows')) or $(TargetFramework.StartsWith('net9.0-windows'))">
     <DefineConstants>$(DefineConstants);HAS_WINRT;HAS_WINFORMS;HAS_WPF;HAS_DISPATCHER;DESKTOPCLR;WINDOWS;CSWINRT</DefineConstants>
   </PropertyGroup>
 
@@ -49,7 +49,7 @@
   </ItemGroup>
 
 
-  <PropertyGroup Condition="$(TargetFramework.StartsWith('net6.0-windows')) or $(TargetFramework.StartsWith('net8.0-windows')) or $(TargetFramework.StartsWith('net9.0-windows'))">
+  <PropertyGroup Condition="$(TargetFramework.StartsWith('net8.0-windows')) or $(TargetFramework.StartsWith('net9.0-windows'))">
     <!--
     In the 9.0.100-rc.2.24474.11 SDK, the build tools attempt to perform code generation for a whole load of our types to support WinRT interop.
     It's looking like it does this for any public type that implements IDisposable!

+ 5 - 5
Rx.NET/Source/facades/System.Reactive/System.Reactive.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>netstandard2.0;net472;uap10.0.18362;net6.0;net6.0-windows10.0.19041</TargetFrameworks>
+    <TargetFrameworks>netstandard2.0;net472;uap10.0.18362;net8.0;net8.0-windows10.0.19041</TargetFrameworks>
     <Nullable>enable</Nullable>
 
     <DefineConstants>$(DefineConstants);LEGACY_SYSTEM_REACTIVE_FACADE</DefineConstants>
@@ -72,7 +72,7 @@
 
 
     <!-- WindowsRuntime (netX.0-windows and UWP) -->
-  <ItemGroup Condition=" $(TargetFramework.StartsWith('uap10.0')) or $(TargetFramework.StartsWith('net6.0-windows')) or $(TargetFramework.StartsWith('net7.0-windows'))">
+  <ItemGroup Condition=" $(TargetFramework.StartsWith('uap10.0')) or $(TargetFramework.StartsWith('net8.0-windows')) or $(TargetFramework.StartsWith('net9.0-windows'))">
     <EmbeddedResource Include="Obsolete\UWP\Strings_PlatformServices.resx" />
     <Compile Update="Obsolete\UWP\Strings_PlatformServices.Designer.cs">
       <DependentUpon>Obsolete\UWP\Strings_PlatformServices.resx</DependentUpon>
@@ -85,13 +85,13 @@
   </ItemGroup>
 
   <!-- Windows Forms and WPF -->
-  <ItemGroup Condition="('$(TargetFramework)' == 'net472') or $(TargetFramework.StartsWith('net6.0-windows')) or $(TargetFramework.StartsWith('net8.0-windows')) or $(TargetFramework.StartsWith('net9.0-windows'))">
+  <ItemGroup Condition="('$(TargetFramework)' == 'net472') or $(TargetFramework.StartsWith('net8.0-windows')) or $(TargetFramework.StartsWith('net9.0-windows'))">
     <ProjectReference Include="..\..\src\System.Reactive.For.WindowsForms\System.Reactive.For.WindowsForms.csproj" />
     <ProjectReference Include="..\..\src\System.Reactive.For.Wpf\System.Reactive.For.Wpf.csproj" />
   </ItemGroup>
   
   <!-- Windows includes for Desktop and UWP -->
-  <ItemGroup Condition=" '$(TargetFramework)' == 'net472' or $(TargetFramework.StartsWith('uap10.0')) or $(TargetFramework.StartsWith('net6.0-windows')) or $(TargetFramework.StartsWith('net7.0-windows'))">
+  <ItemGroup Condition=" '$(TargetFramework)' == 'net472' or $(TargetFramework.StartsWith('uap10.0')) or $(TargetFramework.StartsWith('net8.0-windows')) or $(TargetFramework.StartsWith('net9.0-windows'))">
     <Compile Include="Obsolete\Windows\**\*.cs" />
     <EmbeddedResource Include="Obsolete\Windows\**\*.resx" />
   </ItemGroup>
@@ -105,7 +105,7 @@
     <Compile Include="Obsolete\Remoting\**\*.cs" />
   </ItemGroup>
 
-  <ItemGroup Condition=" '$(TargetFramework)' == 'net472' or $(TargetFramework.StartsWith('net6.0-windows')) or $(TargetFramework.StartsWith('net7.0-windows'))">
+  <ItemGroup Condition=" '$(TargetFramework)' == 'net472' or $(TargetFramework.StartsWith('net8.0-windows')) or $(TargetFramework.StartsWith('net9.0-windows'))">
     <Compile Include="Obsolete\Desktop\**\*.cs" />
   </ItemGroup>
 

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

@@ -1,6 +1,6 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <TargetFrameworks>netstandard2.0;net472;uap10.0.18362;net6.0</TargetFrameworks>
+    <TargetFrameworks>netstandard2.0;net472;uap10.0.18362;net8.0</TargetFrameworks>
     <CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
     <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>    

+ 1 - 1
Rx.NET/Source/src/System.Reactive.For.WindowsForms/System.Reactive.For.WindowsForms.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>net472;net6.0-windows</TargetFrameworks>
+    <TargetFrameworks>net472;net8.0-windows</TargetFrameworks>
     <UseWindowsForms>true</UseWindowsForms>
 
     <PackageTags>Rx;Reactive;Extensions;Observable;LINQ;Events;Windows Forms</PackageTags>

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

@@ -17,7 +17,7 @@
     supported by tooling (e.g., the .NET SDK), which is why we've chosen it here.
     For UWP we need a newer version because Visual Studio 2022 supports nothing older than 18362.
     -->
-    <TargetFrameworks>net6.0-windows10.0.17763.0;uap10.0.18362</TargetFrameworks>
+    <TargetFrameworks>net8.0-windows10.0.17763.0;uap10.0.18362</TargetFrameworks>
 
     <PackageTags>Rx;Reactive;Extensions;Observable;LINQ;Events;Windows Forms</PackageTags>
     <Description>Reactive Extensions (Rx) for .NET</Description>

+ 1 - 1
Rx.NET/Source/src/System.Reactive.For.Wpf/System.Reactive.For.Wpf.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>net472;net6.0-windows</TargetFrameworks>
+    <TargetFrameworks>net472;net8.0-windows</TargetFrameworks>
     <UseWPF>true</UseWPF>
 
     <PackageTags>Rx;Reactive;Extensions;Observable;LINQ;Events;WPF</PackageTags>

+ 3 - 3
Rx.NET/Source/src/System.Reactive.Net/System.Reactive.Net.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>
-    <TargetFrameworks>netstandard2.0;net472;uap10.0.18362;net6.0;net6.0-windows10.0.19041</TargetFrameworks>
+    <TargetFrameworks>netstandard2.0;net472;uap10.0.18362;net8.0;net8.0-windows10.0.19041</TargetFrameworks>
     <CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
     <PackageTags>Rx;Reactive;Extensions;Observable;LINQ;Events</PackageTags>
     <Description>Reactive Extensions (Rx) for .NET</Description>
@@ -14,11 +14,11 @@
     <Nullable>enable</Nullable>
   </PropertyGroup>
 
-  <PropertyGroup Condition="$(TargetFramework.StartsWith('net6.0')) or $(TargetFramework.StartsWith('net7.0'))">
+  <PropertyGroup Condition="$(TargetFramework.StartsWith('net8.0')) or $(TargetFramework.StartsWith('net9.0'))">
     <IsTrimmable>true</IsTrimmable>
   </PropertyGroup>
 
-  <PropertyGroup Condition="$(TargetFramework.StartsWith('net6.0-windows')) or $(TargetFramework.StartsWith('net7.0-windows'))">
+  <PropertyGroup Condition="$(TargetFramework.StartsWith('net8.0-windows')) or $(TargetFramework.StartsWith('net9.0-windows'))">
     <UseWPF>true</UseWPF>
     <UseWindowsForms>true</UseWindowsForms>
   </PropertyGroup>

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

@@ -1,6 +1,6 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <TargetFrameworks>netstandard2.0;net472;uap10.0.18362;net6.0</TargetFrameworks>
+    <TargetFrameworks>netstandard2.0;net472;uap10.0.18362;net8.0</TargetFrameworks>
     <Title>Reactive Extensions - Aliases</Title>    
     <CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>    
     <PackageTags>Rx;Reactive;Extensions;Observable;LINQ;Events</PackageTags>

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

@@ -21,10 +21,10 @@
     We need to be on a sufficiently recent version of the test framework, because we need this fix:
       https://github.com/microsoft/testfx/pull/1071
     Without this, the test runner fails to process Windows-version-specific TFMs for .NET 6.0.
-    Since the various libraries that require net6.0-windows all specify a minimum version (10.0.19041
+    Since the various libraries that require net8.0-windows all specify a minimum version (10.0.19041
     for reasons not currently clear to me; idg10) this test project needs to specify at least as new
-    a version. If we write just net6.0-windows, that turns out to imply Windows 7.0, so it is not
-    considered compatible with a net6.0-windows10.0.19041 library.
+    a version. If we write just net8.0-windows, that turns out to imply Windows 7.0, so it is not
+    considered compatible with a net8.0-windows10.0.19041 library.
     Before that PR was merged, the test runner wouldn't work if the host specified a TFM with a
     specific Windows version.
 -->

+ 12 - 28
azure-pipelines.rx.yml

@@ -129,19 +129,14 @@ stages:
 
     steps:
     - task: UseDotNet@2
+      displayName: Use .NET 9.0 SDK
       inputs:
-        version: 8.0.x
-
-    - task: UseDotNet@2
-      displayName: Use .NET 7.0 SDK
-      inputs:
-        version: '7.0.x'
-        packageType: runtime
+        version: 9.0.x
 
     - task: UseDotNet@2
-      displayName: Use .NET 6.0 SDK
+      displayName: Use .NET 8.0 runtime
       inputs:
-        version: '6.0.x'
+        version: '8.0.x'
         packageType: runtime
 
     - task: DotNetCoreCLI@2
@@ -172,22 +167,15 @@ stages:
       inputs:
         command: test
         projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LinuxTests/LinuxTests.csproj
-        arguments: -c $(BuildConfiguration) -f net8.0 --filter "TestCategory!=SkipCI"
-      displayName: Run 8.0 Tests on Linux
+        arguments: -c $(BuildConfiguration) -f net9.0 --filter "TestCategory!=SkipCI"
+      displayName: Run 9.0 Tests on Linux
 
     - task: DotNetCoreCLI@2
       inputs:
         command: test
         projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LinuxTests/LinuxTests.csproj
-        arguments: -c $(BuildConfiguration) -f net7.0 --filter "TestCategory!=SkipCI"
-      displayName: Run 7.0 Tests on Linux
-
-    - task: DotNetCoreCLI@2
-      inputs:
-        command: test
-        projects: $(System.DefaultWorkingDirectory)/Rx.NET/Integration/LinuxTests/LinuxTests.csproj
-        arguments: -c $(BuildConfiguration) -f net6.0 --filter "TestCategory!=SkipCI"
-      displayName: Run 6.0 Tests on Linux
+        arguments: -c $(BuildConfiguration) -f net8.0 --filter "TestCategory!=SkipCI"
+      displayName: Run 8.0 Tests on Linux
 
   - job: WindowsDesktop    
     pool:
@@ -200,19 +188,15 @@ stages:
 
     steps:
     - task: UseDotNet@2
+      displayName: Use .NET 9.0 SDK
       inputs:
-        version: 8.0.x
+        version: 9.0.x
         performMultiLevelLookup: true
 
     - task: UseDotNet@2
-      displayName: Use .NET 7.0 SDK
-      inputs:
-        version: '7.0.x'
-
-    - task: UseDotNet@2
-      displayName: Use .NET 6.0 SDK
+      displayName: Use .NET 8.0 SDK
       inputs:
-        version: '6.0.x'
+        version: '8.0.x'
 
     - task: DotNetCoreCLI@2
       inputs: