From 7d8f155c48014f025afd10bfb53ca0f165b93131 Mon Sep 17 00:00:00 2001 From: OzBob Date: Tue, 18 Oct 2022 14:31:14 +0800 Subject: [PATCH] upgrade to dotnet6 --- .../Program.cs | 1 + ...eactiveUI.Winforms.Samples.Bindings.csproj | 113 +------------- .../packages.config | 13 -- .../Program.cs | 1 + ...eactiveUI.Winforms.Samples.Commands.csproj | 112 +------------- .../ViewModels/MainViewModel.cs | 9 +- .../packages.config | 13 -- .../Program.cs | 1 + ...ReactiveUI.Winforms.Samples.Routing.csproj | 139 ++---------------- .../ViewModels/ShellViewModel.cs | 9 +- .../packages.config | 13 -- ReactiveUI.Winforms.Samples.sln | 4 +- global.json | 6 + 13 files changed, 51 insertions(+), 383 deletions(-) delete mode 100644 ReactiveUI.Winforms.Samples.Bindings/packages.config delete mode 100644 ReactiveUI.Winforms.Samples.Commands/packages.config delete mode 100644 ReactiveUI.Winforms.Samples.Routing/packages.config create mode 100644 global.json diff --git a/ReactiveUI.Winforms.Samples.Bindings/Program.cs b/ReactiveUI.Winforms.Samples.Bindings/Program.cs index 02c957b..9618cb4 100644 --- a/ReactiveUI.Winforms.Samples.Bindings/Program.cs +++ b/ReactiveUI.Winforms.Samples.Bindings/Program.cs @@ -10,6 +10,7 @@ static class Program static void Main() { Application.EnableVisualStyles(); + Application.SetHighDpiMode(HighDpiMode.SystemAware); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MainView()); } diff --git a/ReactiveUI.Winforms.Samples.Bindings/ReactiveUI.Winforms.Samples.Bindings.csproj b/ReactiveUI.Winforms.Samples.Bindings/ReactiveUI.Winforms.Samples.Bindings.csproj index 366f4e4..a9d665d 100644 --- a/ReactiveUI.Winforms.Samples.Bindings/ReactiveUI.Winforms.Samples.Bindings.csproj +++ b/ReactiveUI.Winforms.Samples.Bindings/ReactiveUI.Winforms.Samples.Bindings.csproj @@ -1,114 +1,17 @@ - - - + - Debug - AnyCPU - {16AEBB87-DDC5-444C-B22F-EF9E89835EF0} + net6.0-windows WinExe - ReactiveUI.Winforms.Samples.Bindings - ReactiveUI.Winforms.Samples.Bindings - v4.6.1 - 512 - true - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + false + true + true + true ReactiveUI.Winforms.Samples.Bindings.Program - - - - ..\packages\ReactiveUI.8.0.1\lib\net461\ReactiveUI.dll - - - ..\packages\ReactiveUI.WinForms.8.0.1\lib\net461\ReactiveUI.Winforms.dll - - - ..\packages\Splat.4.0.0\lib\net461\Splat.dll - - - - - ..\packages\System.Drawing.Primitives.4.3.0\lib\net45\System.Drawing.Primitives.dll - - - ..\packages\System.Reactive.Core.3.1.1\lib\net46\System.Reactive.Core.dll - - - ..\packages\System.Reactive.Interfaces.3.1.1\lib\net45\System.Reactive.Interfaces.dll - - - ..\packages\System.Reactive.Linq.3.1.1\lib\net46\System.Reactive.Linq.dll - - - ..\packages\System.Reactive.PlatformServices.3.1.1\lib\net46\System.Reactive.PlatformServices.dll - - - ..\packages\System.Reactive.Windows.Threading.3.1.1\lib\net45\System.Reactive.Windows.Threading.dll - - - - - - - - - - - - - - - Form - - - MainView.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - - - MainView.cs - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - + + - \ No newline at end of file diff --git a/ReactiveUI.Winforms.Samples.Bindings/packages.config b/ReactiveUI.Winforms.Samples.Bindings/packages.config deleted file mode 100644 index 60139cd..0000000 --- a/ReactiveUI.Winforms.Samples.Bindings/packages.config +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/ReactiveUI.Winforms.Samples.Commands/Program.cs b/ReactiveUI.Winforms.Samples.Commands/Program.cs index 7a08802..742e4c8 100644 --- a/ReactiveUI.Winforms.Samples.Commands/Program.cs +++ b/ReactiveUI.Winforms.Samples.Commands/Program.cs @@ -10,6 +10,7 @@ static class Program static void Main() { Application.EnableVisualStyles(); + Application.SetHighDpiMode(HighDpiMode.SystemAware); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MainView()); } diff --git a/ReactiveUI.Winforms.Samples.Commands/ReactiveUI.Winforms.Samples.Commands.csproj b/ReactiveUI.Winforms.Samples.Commands/ReactiveUI.Winforms.Samples.Commands.csproj index 50d65f5..18dc349 100644 --- a/ReactiveUI.Winforms.Samples.Commands/ReactiveUI.Winforms.Samples.Commands.csproj +++ b/ReactiveUI.Winforms.Samples.Commands/ReactiveUI.Winforms.Samples.Commands.csproj @@ -1,113 +1,17 @@ - - - + - Debug - AnyCPU - {B0F115E5-0898-4E65-A6CE-BE3739820D14} + net6.0-windows WinExe - ReactiveUI.Winforms.Samples.Commands - ReactiveUI.Winforms.Samples.Commands - v4.6.1 - 512 - true - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + false + true + true + true ReactiveUI.Winforms.Samples.Commands.Program - - - - ..\packages\ReactiveUI.8.0.1\lib\net461\ReactiveUI.dll - - - ..\packages\ReactiveUI.WinForms.8.0.1\lib\net461\ReactiveUI.Winforms.dll - - - ..\packages\Splat.4.0.0\lib\net461\Splat.dll - - - - ..\packages\System.Drawing.Primitives.4.3.0\lib\net45\System.Drawing.Primitives.dll - - - ..\packages\System.Reactive.Core.3.1.1\lib\net46\System.Reactive.Core.dll - - - ..\packages\System.Reactive.Interfaces.3.1.1\lib\net45\System.Reactive.Interfaces.dll - - - ..\packages\System.Reactive.Linq.3.1.1\lib\net46\System.Reactive.Linq.dll - - - ..\packages\System.Reactive.PlatformServices.3.1.1\lib\net46\System.Reactive.PlatformServices.dll - - - ..\packages\System.Reactive.Windows.Threading.3.1.1\lib\net45\System.Reactive.Windows.Threading.dll - - - - - - - - - - - - Form - - - MainView.cs - - - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - - - MainView.cs - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - + + - - \ No newline at end of file diff --git a/ReactiveUI.Winforms.Samples.Commands/ViewModels/MainViewModel.cs b/ReactiveUI.Winforms.Samples.Commands/ViewModels/MainViewModel.cs index 4eacca1..60a2529 100644 --- a/ReactiveUI.Winforms.Samples.Commands/ViewModels/MainViewModel.cs +++ b/ReactiveUI.Winforms.Samples.Commands/ViewModels/MainViewModel.cs @@ -1,4 +1,5 @@ -using System.Reactive.Linq; +using System.Reactive; +using System.Reactive.Linq; using System.Windows; namespace ReactiveUI.Winforms.Samples.Commands.ViewModels @@ -33,9 +34,9 @@ public string WithCanExecuteParameter set => this.RaiseAndSetIfChanged(ref _withCanExecuteParameter, value); } - public ReactiveCommand ParameterlessCommand { get; } - public ReactiveCommand WithParameterCommand { get; } - public ReactiveCommand WithCanExecuteCommand { get; } + public ReactiveCommand ParameterlessCommand { get; } + public ReactiveCommand WithParameterCommand { get; } + public ReactiveCommand WithCanExecuteCommand { get; } private void Parameterless() { diff --git a/ReactiveUI.Winforms.Samples.Commands/packages.config b/ReactiveUI.Winforms.Samples.Commands/packages.config deleted file mode 100644 index 60139cd..0000000 --- a/ReactiveUI.Winforms.Samples.Commands/packages.config +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/ReactiveUI.Winforms.Samples.Routing/Program.cs b/ReactiveUI.Winforms.Samples.Routing/Program.cs index 1a3a6d6..146132f 100644 --- a/ReactiveUI.Winforms.Samples.Routing/Program.cs +++ b/ReactiveUI.Winforms.Samples.Routing/Program.cs @@ -9,6 +9,7 @@ static class Program static void Main() { Application.EnableVisualStyles(); + Application.SetHighDpiMode(HighDpiMode.SystemAware); Application.SetCompatibleTextRenderingDefault(false); // Create and run Bootstrapper diff --git a/ReactiveUI.Winforms.Samples.Routing/ReactiveUI.Winforms.Samples.Routing.csproj b/ReactiveUI.Winforms.Samples.Routing/ReactiveUI.Winforms.Samples.Routing.csproj index c30f786..39078d7 100644 --- a/ReactiveUI.Winforms.Samples.Routing/ReactiveUI.Winforms.Samples.Routing.csproj +++ b/ReactiveUI.Winforms.Samples.Routing/ReactiveUI.Winforms.Samples.Routing.csproj @@ -1,145 +1,34 @@ - - - + - Debug - AnyCPU - {E72F085F-4227-4563-A3AD-07A630239DF5} + net6.0-windows WinExe - ReactiveUI.Winforms.Samples.Routing - ReactiveUI.Winforms.Samples.Routing - v4.6.1 - 512 - true - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + false + true + true + true ReactiveUI.Winforms.Samples.Routing.Program - - - - ..\packages\ReactiveUI.8.0.1\lib\net461\ReactiveUI.dll - - - ..\packages\ReactiveUI.WinForms.8.0.1\lib\net461\ReactiveUI.Winforms.dll - - - ..\packages\Splat.4.0.0\lib\net461\Splat.dll - - - - - - ..\packages\System.Drawing.Primitives.4.3.0\lib\net45\System.Drawing.Primitives.dll - - - ..\packages\System.Reactive.Core.3.1.1\lib\net46\System.Reactive.Core.dll - - - ..\packages\System.Reactive.Interfaces.3.1.1\lib\net45\System.Reactive.Interfaces.dll - - - ..\packages\System.Reactive.Linq.3.1.1\lib\net46\System.Reactive.Linq.dll - - - ..\packages\System.Reactive.PlatformServices.3.1.1\lib\net46\System.Reactive.PlatformServices.dll - - - ..\packages\System.Reactive.Windows.Threading.3.1.1\lib\net45\System.Reactive.Windows.Threading.dll - - - - - - - - - - - - - + UserControl - - ContactView.cs - - + UserControl - - HomeView.cs - - + UserControl - - AboutView.cs - - - Form - - - ShellView.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - ContactView.cs - - - HomeView.cs - - - AboutView.cs - - - ShellView.cs - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - + + all + + + - \ No newline at end of file diff --git a/ReactiveUI.Winforms.Samples.Routing/ViewModels/ShellViewModel.cs b/ReactiveUI.Winforms.Samples.Routing/ViewModels/ShellViewModel.cs index c47bf32..636427f 100644 --- a/ReactiveUI.Winforms.Samples.Routing/ViewModels/ShellViewModel.cs +++ b/ReactiveUI.Winforms.Samples.Routing/ViewModels/ShellViewModel.cs @@ -1,4 +1,5 @@ using System; +using System.Reactive; namespace ReactiveUI.Winforms.Samples.Routing.ViewModels { @@ -32,10 +33,10 @@ public string ApplicationTitle set => this.RaiseAndSetIfChanged(ref _applicationTitle, value); } - public ReactiveCommand ShowHomeCommand { get; } - public ReactiveCommand ShowAboutCommand { get; } - public ReactiveCommand ShowContactCommand { get; } - public ReactiveCommand GoBackCommand { get; } + public ReactiveCommand ShowHomeCommand { get; } + public ReactiveCommand ShowAboutCommand { get; } + public ReactiveCommand ShowContactCommand { get; } + public ReactiveCommand GoBackCommand { get; } private void ShowHome() { diff --git a/ReactiveUI.Winforms.Samples.Routing/packages.config b/ReactiveUI.Winforms.Samples.Routing/packages.config deleted file mode 100644 index 60139cd..0000000 --- a/ReactiveUI.Winforms.Samples.Routing/packages.config +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/ReactiveUI.Winforms.Samples.sln b/ReactiveUI.Winforms.Samples.sln index a314727..a9a3284 100644 --- a/ReactiveUI.Winforms.Samples.sln +++ b/ReactiveUI.Winforms.Samples.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27428.2037 +# Visual Studio Version 17 +VisualStudioVersion = 17.4.32804.182 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReactiveUI.Winforms.Samples.Routing", "ReactiveUI.Winforms.Samples.Routing\ReactiveUI.Winforms.Samples.Routing.csproj", "{E72F085F-4227-4563-A3AD-07A630239DF5}" EndProject diff --git a/global.json b/global.json new file mode 100644 index 0000000..35b6a55 --- /dev/null +++ b/global.json @@ -0,0 +1,6 @@ +{ + "sdk": { + "version": "6.0.305", + "rollForward": "latestFeature" + } +}