From f16088f337ca89dbac2dcd5629f167b6b06502e0 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Tue, 12 Apr 2022 14:58:08 -0500 Subject: [PATCH 01/20] Added WinUI 2 / 3 switch for Uno libs and heads --- common/Labs.Head.props | 1 + common/Labs.MultiTarget.props | 17 ++--------- common/Labs.Uno.props | 23 ++++++++++++++ common/Labs.Wasm.props | 2 -- common/Scripts/UseUnoWinUI.ps1 | 30 +++++++++++++++++++ .../CommunityToolkit.Labs.Wasm/Program.cs | 7 ++++- 6 files changed, 63 insertions(+), 17 deletions(-) create mode 100644 common/Labs.Uno.props create mode 100644 common/Scripts/UseUnoWinUI.ps1 diff --git a/common/Labs.Head.props b/common/Labs.Head.props index 18ce2781c..4227b19f6 100644 --- a/common/Labs.Head.props +++ b/common/Labs.Head.props @@ -1,5 +1,6 @@ + diff --git a/common/Labs.MultiTarget.props b/common/Labs.MultiTarget.props index de1eafcae..35257b516 100644 --- a/common/Labs.MultiTarget.props +++ b/common/Labs.MultiTarget.props @@ -1,9 +1,8 @@ - + + - 2.x - @@ -42,15 +35,11 @@ - - - - diff --git a/common/Labs.Uno.props b/common/Labs.Uno.props new file mode 100644 index 000000000..8c342107c --- /dev/null +++ b/common/Labs.Uno.props @@ -0,0 +1,23 @@ + + + + + + True + True + + $(DefineConstants); + + + + + + + + + + + diff --git a/common/Labs.Wasm.props b/common/Labs.Wasm.props index 7d60d3005..9ac715322 100644 --- a/common/Labs.Wasm.props +++ b/common/Labs.Wasm.props @@ -26,8 +26,6 @@ - - diff --git a/common/Scripts/UseUnoWinUI.ps1 b/common/Scripts/UseUnoWinUI.ps1 new file mode 100644 index 000000000..77847bb37 --- /dev/null +++ b/common/Scripts/UseUnoWinUI.ps1 @@ -0,0 +1,30 @@ +Param ( + [Parameter(HelpMessage = "The WinUI version to use when building an Uno head.", Mandatory = $true)] + [ValidateSet('2', '3')] + [string]$targets, + + [Parameter(HelpMessage = "Disables suppressing changes to the Labs.Uno.props file in git, allowing changes to be committed.")] + [switch]$allowGitChanges = $false +) + +if ($allowGitChanges.IsPresent) { + Write-Warning "Changes to the default Uno package reference in Labs can now be committed. Run this command again without the --allow-git-changes flag to disable committing further changes."; + git update-index --no-assume-unchanged ../Labs.Uno.props +} +else { + git update-index --assume-unchanged ../Labs.Uno.props +} + +$fileContents = Get-Content -Path ../Labs.Uno.props + +if ($targets -eq "3") { + $fileContents = $fileContents -replace 'Uno.UI', 'Uno.WinUI'; + $fileContents = $fileContents -replace '\$\(DefineConstants\);', '$(DefineConstants);WINAPPSDK;'; +} + +if ($targets -eq "2") { + $fileContents = $fileContents -replace 'Uno.WinUI', 'Uno.UI'; + $fileContents = $fileContents -replace '\$\(DefineConstants\);WINAPPSDK;', '$(DefineConstants);'; +} + +Set-Content -Force -Path ../Labs.Uno.props -Value $fileContents; diff --git a/platforms/CommunityToolkit.Labs.Wasm/Program.cs b/platforms/CommunityToolkit.Labs.Wasm/Program.cs index f498a68a6..8e0b71456 100644 --- a/platforms/CommunityToolkit.Labs.Wasm/Program.cs +++ b/platforms/CommunityToolkit.Labs.Wasm/Program.cs @@ -1,6 +1,11 @@ using CommunityToolkit.Labs.Shared; using System; + +#if WINAPPSDK +using Microsoft.UI.Xaml; +#else using Windows.UI.Xaml; +#endif namespace CommunityToolkit.Labs.Wasm { @@ -10,7 +15,7 @@ public class Program static int Main(string[] args) { - Windows.UI.Xaml.Application.Start(_ => _app = new App()); + Application.Start(_ => _app = new App()); return 0; } From a990aff569d283a2f34488ecb5355017f27a91b3 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 13 Apr 2022 13:14:11 -0500 Subject: [PATCH 02/20] Fixed building Android under both WinUI 2 and 3 --- .../CommunityToolkit.Labs.Droid.csproj | 7 +++---- platforms/CommunityToolkit.Labs.Droid/Main.cs | 9 ++++++++- platforms/CommunityToolkit.Labs.Droid/MainActivity.cs | 8 +++++++- .../CommunityToolkit.Labs.Skia.Gtk.csproj | 2 -- .../CommunityToolkit.Labs.Skia.Wpf.Host.csproj | 3 +-- .../CommunityToolkit.Labs.Skia.WPF.csproj | 2 -- 6 files changed, 19 insertions(+), 12 deletions(-) diff --git a/platforms/CommunityToolkit.Labs.Droid/CommunityToolkit.Labs.Droid.csproj b/platforms/CommunityToolkit.Labs.Droid/CommunityToolkit.Labs.Droid.csproj index b07cb3927..cde2ac829 100644 --- a/platforms/CommunityToolkit.Labs.Droid/CommunityToolkit.Labs.Droid.csproj +++ b/platforms/CommunityToolkit.Labs.Droid/CommunityToolkit.Labs.Droid.csproj @@ -3,6 +3,7 @@ + Debug AnyCPU @@ -30,7 +31,7 @@ portable false bin\Debug\ - DEBUG;TRACE + $(DefineConstants);DEBUG;TRACE prompt 4 True @@ -49,7 +50,7 @@ true true bin\Release\ - TRACE + $(DefineConstants);TRACE prompt 4 False @@ -70,8 +71,6 @@ - - diff --git a/platforms/CommunityToolkit.Labs.Droid/Main.cs b/platforms/CommunityToolkit.Labs.Droid/Main.cs index 74223ee4c..82cf65bcf 100644 --- a/platforms/CommunityToolkit.Labs.Droid/Main.cs +++ b/platforms/CommunityToolkit.Labs.Droid/Main.cs @@ -9,7 +9,14 @@ using Android.Views; using Android.Widget; using Com.Nostra13.Universalimageloader.Core; + +#if WINAPPSDK +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Media; +#else +using Windows.UI.Xaml; using Windows.UI.Xaml.Media; +#endif namespace CommunityToolkit.Labs.Droid { @@ -20,7 +27,7 @@ namespace CommunityToolkit.Labs.Droid HardwareAccelerated = true, Theme = "@style/AppTheme" )] - public class Application : Windows.UI.Xaml.NativeApplication + public class Application : NativeApplication { public Application(IntPtr javaReference, JniHandleOwnership transfer) : base(() => new CommunityToolkit.Labs.Shared.App(), javaReference, transfer) diff --git a/platforms/CommunityToolkit.Labs.Droid/MainActivity.cs b/platforms/CommunityToolkit.Labs.Droid/MainActivity.cs index df8943307..ad3a52a51 100644 --- a/platforms/CommunityToolkit.Labs.Droid/MainActivity.cs +++ b/platforms/CommunityToolkit.Labs.Droid/MainActivity.cs @@ -4,6 +4,12 @@ using Android.Content.PM; using Android.Views; +#if WINAPPSDK +using Microsoft.UI.Xaml; +#else +using Windows.UI.Xaml; +#endif + namespace CommunityToolkit.Labs.Droid { [Activity( @@ -11,7 +17,7 @@ namespace CommunityToolkit.Labs.Droid ConfigurationChanges = global::Uno.UI.ActivityHelper.AllConfigChanges, WindowSoftInputMode = SoftInput.AdjustPan | SoftInput.StateHidden )] - public class MainActivity : Windows.UI.Xaml.ApplicationActivity + public class MainActivity : ApplicationActivity { } } diff --git a/platforms/CommunityToolkit.Labs.Skia.Gtk/CommunityToolkit.Labs.Skia.Gtk.csproj b/platforms/CommunityToolkit.Labs.Skia.Gtk/CommunityToolkit.Labs.Skia.Gtk.csproj index c173c14e1..10cefc9f1 100644 --- a/platforms/CommunityToolkit.Labs.Skia.Gtk/CommunityToolkit.Labs.Skia.Gtk.csproj +++ b/platforms/CommunityToolkit.Labs.Skia.Gtk/CommunityToolkit.Labs.Skia.Gtk.csproj @@ -19,8 +19,6 @@ - - diff --git a/platforms/CommunityToolkit.Labs.Skia.WPF.Host/CommunityToolkit.Labs.Skia.Wpf.Host.csproj b/platforms/CommunityToolkit.Labs.Skia.WPF.Host/CommunityToolkit.Labs.Skia.Wpf.Host.csproj index 125d1b578..7c5d2e33c 100644 --- a/platforms/CommunityToolkit.Labs.Skia.WPF.Host/CommunityToolkit.Labs.Skia.Wpf.Host.csproj +++ b/platforms/CommunityToolkit.Labs.Skia.WPF.Host/CommunityToolkit.Labs.Skia.Wpf.Host.csproj @@ -1,5 +1,6 @@ + WinExe @@ -9,8 +10,6 @@ app.manifest - - diff --git a/platforms/CommunityToolkit.Labs.Skia.WPF/CommunityToolkit.Labs.Skia.WPF.csproj b/platforms/CommunityToolkit.Labs.Skia.WPF/CommunityToolkit.Labs.Skia.WPF.csproj index ee5fb2f80..8b566cf88 100644 --- a/platforms/CommunityToolkit.Labs.Skia.WPF/CommunityToolkit.Labs.Skia.WPF.csproj +++ b/platforms/CommunityToolkit.Labs.Skia.WPF/CommunityToolkit.Labs.Skia.WPF.csproj @@ -9,8 +9,6 @@ - - From b89e24d70dbe9a37c4d886c41dc37e3c68104b94 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 13 Apr 2022 13:18:19 -0500 Subject: [PATCH 03/20] Fixed building iOS under WinUI 2 and 3 --- .../CommunityToolkit.Labs.iOS.csproj | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/platforms/CommunityToolkit.Labs.iOS/CommunityToolkit.Labs.iOS.csproj b/platforms/CommunityToolkit.Labs.iOS/CommunityToolkit.Labs.iOS.csproj index 2d243a6ce..69b80a985 100644 --- a/platforms/CommunityToolkit.Labs.iOS/CommunityToolkit.Labs.iOS.csproj +++ b/platforms/CommunityToolkit.Labs.iOS/CommunityToolkit.Labs.iOS.csproj @@ -21,7 +21,7 @@ portable false bin\iPhoneSimulator\Debug - DEBUG + $(DefineConstants);DEBUG prompt 4 false @@ -46,7 +46,7 @@ full false bin\iPhone\Debug - DEBUG + $(DefineConstants);DEBUG prompt 4 false @@ -116,8 +116,6 @@ - - From d90fcf66f78a71710acbdea311d71eb1d519a43d Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 13 Apr 2022 13:24:42 -0500 Subject: [PATCH 04/20] Fixed building MacOS under WinUI 2 / 3 --- .../CommunityToolkit.Labs.macOS.csproj | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/platforms/CommunityToolkit.Labs.macOS/CommunityToolkit.Labs.macOS.csproj b/platforms/CommunityToolkit.Labs.macOS/CommunityToolkit.Labs.macOS.csproj index 07387dceb..0f53ae9d2 100644 --- a/platforms/CommunityToolkit.Labs.macOS/CommunityToolkit.Labs.macOS.csproj +++ b/platforms/CommunityToolkit.Labs.macOS/CommunityToolkit.Labs.macOS.csproj @@ -20,7 +20,7 @@ full false bin\Debug - DEBUG + $(DefineConstants);DEBUG prompt 4 false @@ -45,8 +45,7 @@ pdbonly true bin\Release - - + $(DefineConstants); prompt 4 false @@ -72,8 +71,6 @@ - - From 4ed156f862f9fa88bd32905281a782d32d02839b Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 13 Apr 2022 13:33:15 -0500 Subject: [PATCH 05/20] Add missing changes to default Uno props file needed for compilation. Fixed compiling GTK under WinUI 2 / 3 --- common/Labs.Uno.props | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/common/Labs.Uno.props b/common/Labs.Uno.props index 8c342107c..4b47e4387 100644 --- a/common/Labs.Uno.props +++ b/common/Labs.Uno.props @@ -1,23 +1,36 @@ - - + - True True + True + True + True + True + True + + True $(DefineConstants); - - + + - - + + + + + + + + + + + + + From 1f405afdc8f54ebdf1bf02f0d6acd485db4e8a69 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 13 Apr 2022 13:39:27 -0500 Subject: [PATCH 06/20] Fixed WPF building under WinUI 2 and 3 --- common/Labs.Uno.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/Labs.Uno.props b/common/Labs.Uno.props index 4b47e4387..39f6a9124 100644 --- a/common/Labs.Uno.props +++ b/common/Labs.Uno.props @@ -3,7 +3,7 @@ True - True + True True True True From 7ff516cb59349499a616c3e4f7f8e5043bfc6832 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 13 Apr 2022 13:53:16 -0500 Subject: [PATCH 07/20] Fixed individual sample head not building under WinUI 2 / 3 --- labs/CanvasLayout/samples/CanvasLayout.Wasm/Program.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/labs/CanvasLayout/samples/CanvasLayout.Wasm/Program.cs b/labs/CanvasLayout/samples/CanvasLayout.Wasm/Program.cs index 236a5af5e..8de4e65c7 100644 --- a/labs/CanvasLayout/samples/CanvasLayout.Wasm/Program.cs +++ b/labs/CanvasLayout/samples/CanvasLayout.Wasm/Program.cs @@ -1,6 +1,11 @@ using CommunityToolkit.Labs.Shared; using System; + +#if WINAPPSDK +using Microsoft.UI.Xaml; +#else using Windows.UI.Xaml; +#endif namespace CanvasLayout.Wasm { @@ -10,7 +15,7 @@ public class Program static int Main(string[] args) { - Windows.UI.Xaml.Application.Start(_ => _app = new App()); + Application.Start(_ => _app = new App()); return 0; } From 1ceab73a3845a052a60b24b7b4771e98da6f8939 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 13 Apr 2022 14:04:59 -0500 Subject: [PATCH 08/20] Fixed issue where switching to WinUI 3 multiples times and back to WinUI 2 would cause compilation constant not being cleaned up --- common/Scripts/UseUnoWinUI.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/Scripts/UseUnoWinUI.ps1 b/common/Scripts/UseUnoWinUI.ps1 index 77847bb37..c19bb4a5f 100644 --- a/common/Scripts/UseUnoWinUI.ps1 +++ b/common/Scripts/UseUnoWinUI.ps1 @@ -24,7 +24,7 @@ if ($targets -eq "3") { if ($targets -eq "2") { $fileContents = $fileContents -replace 'Uno.WinUI', 'Uno.UI'; - $fileContents = $fileContents -replace '\$\(DefineConstants\);WINAPPSDK;', '$(DefineConstants);'; + $fileContents = $fileContents -replace 'WINAPPSDK;', ''; } Set-Content -Force -Path ../Labs.Uno.props -Value $fileContents; From bed0935464d8e871fe3e02571f6be31b12290147 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 13 Apr 2022 15:48:49 -0500 Subject: [PATCH 09/20] Fixed UWP not building when WinUI 3 is enabled --- common/Labs.Head.props | 2 -- common/Labs.MultiTarget.props | 6 ++++-- common/Labs.Uno.props | 8 ++++---- common/Labs.Uwp.props | 16 ++++++++-------- common/Labs.Wasm.props | 4 ++++ .../CommunityToolkit.Labs.Droid.csproj | 5 +++-- .../CommunityToolkit.Labs.Skia.Gtk.csproj | 5 ++++- .../CommunityToolkit.Labs.Skia.WPF.csproj | 4 ++++ .../CommunityToolkit.Labs.Wasm.csproj | 4 ++-- .../CommunityToolkit.Labs.iOS.csproj | 4 +++- .../CommunityToolkit.Labs.macOS.csproj | 6 ++++-- 11 files changed, 40 insertions(+), 24 deletions(-) diff --git a/common/Labs.Head.props b/common/Labs.Head.props index 4227b19f6..71f95018f 100644 --- a/common/Labs.Head.props +++ b/common/Labs.Head.props @@ -1,7 +1,5 @@ - - diff --git a/common/Labs.MultiTarget.props b/common/Labs.MultiTarget.props index 35257b516..67ea75e2a 100644 --- a/common/Labs.MultiTarget.props +++ b/common/Labs.MultiTarget.props @@ -10,7 +10,9 @@ and use the value directly. --> - netstandard2.0; + $(WasmLibTargetFramework); + $(WpfLibTargetFramework); + $(LinuxLibTargetFramework); $(UwpTargetFramework); $(WinAppSdkTargetFramework); $(MacOSLibTargetFramework); @@ -20,7 +22,7 @@ true false - $(DefineConstants)WINAPPSDK + $(DefineConstants);WINAPPSDK diff --git a/common/Labs.Uno.props b/common/Labs.Uno.props index 39f6a9124..bf82ea85a 100644 --- a/common/Labs.Uno.props +++ b/common/Labs.Uno.props @@ -2,16 +2,16 @@ - True - True - True + True + True + True True True True True - $(DefineConstants); + $(DefineConstants); diff --git a/common/Labs.Uwp.props b/common/Labs.Uwp.props index ce5539590..06ecfc7f1 100644 --- a/common/Labs.Uwp.props +++ b/common/Labs.Uwp.props @@ -27,7 +27,7 @@ true bin\x86\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + $(DefineConstants);DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP ;2008 full x86 @@ -38,7 +38,7 @@ bin\x86\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP + $(DefineConstants);TRACE;NETFX_CORE;WINDOWS_UWP true ;2008 pdbonly @@ -52,7 +52,7 @@ true bin\ARM\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + $(DefineConstants);DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP ;2008 full ARM @@ -63,7 +63,7 @@ bin\ARM\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP + $(DefineConstants);TRACE;NETFX_CORE;WINDOWS_UWP true ;2008 pdbonly @@ -77,7 +77,7 @@ true bin\ARM64\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + $(DefineConstants);DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP ;2008 full ARM64 @@ -89,7 +89,7 @@ bin\ARM64\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP + $(DefineConstants);TRACE;NETFX_CORE;WINDOWS_UWP true ;2008 pdbonly @@ -103,7 +103,7 @@ true bin\x64\Debug\ - DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP + $(DefineConstants);DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP ;2008 full x64 @@ -114,7 +114,7 @@ bin\x64\Release\ - TRACE;NETFX_CORE;WINDOWS_UWP + $(DefineConstants);TRACE;NETFX_CORE;WINDOWS_UWP true ;2008 pdbonly diff --git a/common/Labs.Wasm.props b/common/Labs.Wasm.props index 9ac715322..2a28c2b87 100644 --- a/common/Labs.Wasm.props +++ b/common/Labs.Wasm.props @@ -1,11 +1,15 @@ + Exe $(WasmHeadTargetFramework) NU1701 + False + False + True true diff --git a/platforms/CommunityToolkit.Labs.Droid/CommunityToolkit.Labs.Droid.csproj b/platforms/CommunityToolkit.Labs.Droid/CommunityToolkit.Labs.Droid.csproj index cde2ac829..c052db235 100644 --- a/platforms/CommunityToolkit.Labs.Droid/CommunityToolkit.Labs.Droid.csproj +++ b/platforms/CommunityToolkit.Labs.Droid/CommunityToolkit.Labs.Droid.csproj @@ -1,8 +1,9 @@  - - + + + Debug diff --git a/platforms/CommunityToolkit.Labs.Skia.Gtk/CommunityToolkit.Labs.Skia.Gtk.csproj b/platforms/CommunityToolkit.Labs.Skia.Gtk/CommunityToolkit.Labs.Skia.Gtk.csproj index 10cefc9f1..de61c9188 100644 --- a/platforms/CommunityToolkit.Labs.Skia.Gtk/CommunityToolkit.Labs.Skia.Gtk.csproj +++ b/platforms/CommunityToolkit.Labs.Skia.Gtk/CommunityToolkit.Labs.Skia.Gtk.csproj @@ -2,8 +2,12 @@ + + True + False + False WinExe Exe $(LinuxHeadTargetFramework) @@ -21,5 +25,4 @@ - diff --git a/platforms/CommunityToolkit.Labs.Skia.WPF/CommunityToolkit.Labs.Skia.WPF.csproj b/platforms/CommunityToolkit.Labs.Skia.WPF/CommunityToolkit.Labs.Skia.WPF.csproj index 8b566cf88..9d5d1a959 100644 --- a/platforms/CommunityToolkit.Labs.Skia.WPF/CommunityToolkit.Labs.Skia.WPF.csproj +++ b/platforms/CommunityToolkit.Labs.Skia.WPF/CommunityToolkit.Labs.Skia.WPF.csproj @@ -2,8 +2,12 @@ + + False + True + False $(WpfLibTargetFramework) diff --git a/platforms/CommunityToolkit.Labs.Wasm/CommunityToolkit.Labs.Wasm.csproj b/platforms/CommunityToolkit.Labs.Wasm/CommunityToolkit.Labs.Wasm.csproj index 481ed1b1c..b78aa367f 100644 --- a/platforms/CommunityToolkit.Labs.Wasm/CommunityToolkit.Labs.Wasm.csproj +++ b/platforms/CommunityToolkit.Labs.Wasm/CommunityToolkit.Labs.Wasm.csproj @@ -1,6 +1,6 @@ - - + + diff --git a/platforms/CommunityToolkit.Labs.iOS/CommunityToolkit.Labs.iOS.csproj b/platforms/CommunityToolkit.Labs.iOS/CommunityToolkit.Labs.iOS.csproj index 69b80a985..40bbfc7a8 100644 --- a/platforms/CommunityToolkit.Labs.iOS/CommunityToolkit.Labs.iOS.csproj +++ b/platforms/CommunityToolkit.Labs.iOS/CommunityToolkit.Labs.iOS.csproj @@ -1,8 +1,10 @@  - + + + Debug iPhoneSimulator diff --git a/platforms/CommunityToolkit.Labs.macOS/CommunityToolkit.Labs.macOS.csproj b/platforms/CommunityToolkit.Labs.macOS/CommunityToolkit.Labs.macOS.csproj index 0f53ae9d2..971023051 100644 --- a/platforms/CommunityToolkit.Labs.macOS/CommunityToolkit.Labs.macOS.csproj +++ b/platforms/CommunityToolkit.Labs.macOS/CommunityToolkit.Labs.macOS.csproj @@ -1,8 +1,10 @@  - - + + + + Debug iPhoneSimulator From 6830d4468859642558dc2982d8afcaf2b3df26ff Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 13 Apr 2022 17:19:00 -0500 Subject: [PATCH 10/20] Fixed building under WinUI 2 ./ 3 when all TFMs are enabled --- common/Labs.Uno.props | 27 ++++++++++++------- common/Labs.Wasm.props | 13 ++++++--- .../CommunityToolkit.Labs.Droid.csproj | 5 ++++ .../CommunityToolkit.Labs.Skia.Gtk.csproj | 10 ++++--- ...CommunityToolkit.Labs.Skia.Wpf.Host.csproj | 9 +++++++ .../CommunityToolkit.Labs.Skia.WPF.csproj | 11 +++++--- .../CommunityToolkit.Labs.iOS.csproj | 5 ++++ .../CommunityToolkit.Labs.macOS.csproj | 5 ++++ 8 files changed, 65 insertions(+), 20 deletions(-) diff --git a/common/Labs.Uno.props b/common/Labs.Uno.props index bf82ea85a..47f4a7184 100644 --- a/common/Labs.Uno.props +++ b/common/Labs.Uno.props @@ -2,12 +2,21 @@ - True - True - True - True - True - True + True + True + True + + True + True + True + + True + True + True + + True + True + True True @@ -22,15 +31,15 @@ - + - + - + diff --git a/common/Labs.Wasm.props b/common/Labs.Wasm.props index 2a28c2b87..0b5596454 100644 --- a/common/Labs.Wasm.props +++ b/common/Labs.Wasm.props @@ -1,15 +1,20 @@ + + + False + False + False + True + False + + Exe $(WasmHeadTargetFramework) - NU1701 - False - False - True true diff --git a/platforms/CommunityToolkit.Labs.Droid/CommunityToolkit.Labs.Droid.csproj b/platforms/CommunityToolkit.Labs.Droid/CommunityToolkit.Labs.Droid.csproj index c052db235..b13f17e5f 100644 --- a/platforms/CommunityToolkit.Labs.Droid/CommunityToolkit.Labs.Droid.csproj +++ b/platforms/CommunityToolkit.Labs.Droid/CommunityToolkit.Labs.Droid.csproj @@ -3,6 +3,11 @@ + + + True + + diff --git a/platforms/CommunityToolkit.Labs.Skia.Gtk/CommunityToolkit.Labs.Skia.Gtk.csproj b/platforms/CommunityToolkit.Labs.Skia.Gtk/CommunityToolkit.Labs.Skia.Gtk.csproj index de61c9188..3862b9b00 100644 --- a/platforms/CommunityToolkit.Labs.Skia.Gtk/CommunityToolkit.Labs.Skia.Gtk.csproj +++ b/platforms/CommunityToolkit.Labs.Skia.Gtk/CommunityToolkit.Labs.Skia.Gtk.csproj @@ -2,12 +2,16 @@ + + + True + False + False + + - True - False - False WinExe Exe $(LinuxHeadTargetFramework) diff --git a/platforms/CommunityToolkit.Labs.Skia.WPF.Host/CommunityToolkit.Labs.Skia.Wpf.Host.csproj b/platforms/CommunityToolkit.Labs.Skia.WPF.Host/CommunityToolkit.Labs.Skia.Wpf.Host.csproj index 7c5d2e33c..30ac604b8 100644 --- a/platforms/CommunityToolkit.Labs.Skia.WPF.Host/CommunityToolkit.Labs.Skia.Wpf.Host.csproj +++ b/platforms/CommunityToolkit.Labs.Skia.WPF.Host/CommunityToolkit.Labs.Skia.Wpf.Host.csproj @@ -1,5 +1,13 @@ + + + False + True + False + False + + @@ -9,6 +17,7 @@ true app.manifest + diff --git a/platforms/CommunityToolkit.Labs.Skia.WPF/CommunityToolkit.Labs.Skia.WPF.csproj b/platforms/CommunityToolkit.Labs.Skia.WPF/CommunityToolkit.Labs.Skia.WPF.csproj index 9d5d1a959..3f24e2e0d 100644 --- a/platforms/CommunityToolkit.Labs.Skia.WPF/CommunityToolkit.Labs.Skia.WPF.csproj +++ b/platforms/CommunityToolkit.Labs.Skia.WPF/CommunityToolkit.Labs.Skia.WPF.csproj @@ -2,14 +2,17 @@ - - False - True - False + False + True + True + False $(WpfLibTargetFramework) + + + diff --git a/platforms/CommunityToolkit.Labs.iOS/CommunityToolkit.Labs.iOS.csproj b/platforms/CommunityToolkit.Labs.iOS/CommunityToolkit.Labs.iOS.csproj index 40bbfc7a8..1067a459b 100644 --- a/platforms/CommunityToolkit.Labs.iOS/CommunityToolkit.Labs.iOS.csproj +++ b/platforms/CommunityToolkit.Labs.iOS/CommunityToolkit.Labs.iOS.csproj @@ -3,6 +3,11 @@ + + + True + + diff --git a/platforms/CommunityToolkit.Labs.macOS/CommunityToolkit.Labs.macOS.csproj b/platforms/CommunityToolkit.Labs.macOS/CommunityToolkit.Labs.macOS.csproj index 971023051..52c7ab153 100644 --- a/platforms/CommunityToolkit.Labs.macOS/CommunityToolkit.Labs.macOS.csproj +++ b/platforms/CommunityToolkit.Labs.macOS/CommunityToolkit.Labs.macOS.csproj @@ -3,6 +3,11 @@ + + + True + + From 74f7b29857ab0230f713e180e8d5c3fc7d4c8f7b Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 13 Apr 2022 18:07:44 -0500 Subject: [PATCH 11/20] Fixed building in Visual Studio --- common/Labs.MultiTarget.props | 4 +--- common/Labs.TargetFrameworks.All.props | 9 +++++++-- common/Labs.TargetFrameworks.props | 9 +++++++-- common/Scripts/UseTargetFrameworks.ps1 | 6 +++--- .../CanvasLayout.Sample/CanvasLayout.Sample.csproj | 4 +--- 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/common/Labs.MultiTarget.props b/common/Labs.MultiTarget.props index 67ea75e2a..ccd245502 100644 --- a/common/Labs.MultiTarget.props +++ b/common/Labs.MultiTarget.props @@ -10,9 +10,7 @@ and use the value directly. --> - $(WasmLibTargetFramework); - $(WpfLibTargetFramework); - $(LinuxLibTargetFramework); + $(NetStandardCommonTargetFramework); $(UwpTargetFramework); $(WinAppSdkTargetFramework); $(MacOSLibTargetFramework); diff --git a/common/Labs.TargetFrameworks.All.props b/common/Labs.TargetFrameworks.All.props index 80b091f45..e0299d571 100644 --- a/common/Labs.TargetFrameworks.All.props +++ b/common/Labs.TargetFrameworks.All.props @@ -7,11 +7,16 @@ net5.0 netcoreapp3.1 - netstandard2.0 - netstandard2.0 monoandroid11.0 xamarinmac20 xamarinios10 + + + netstandard2.0 + netstandard2.0 netstandard2.0 + + + netstandard2.0 \ No newline at end of file diff --git a/common/Labs.TargetFrameworks.props b/common/Labs.TargetFrameworks.props index 78d051bb6..417d9af87 100644 --- a/common/Labs.TargetFrameworks.props +++ b/common/Labs.TargetFrameworks.props @@ -7,11 +7,16 @@ net5.0 netcoreapp3.1 - netstandard2.0 - + + + netstandard2.0 + netstandard2.0 netstandard2.0 + + + netstandard2.0 diff --git a/common/Scripts/UseTargetFrameworks.ps1 b/common/Scripts/UseTargetFrameworks.ps1 index cafc25b3a..64371fb68 100644 --- a/common/Scripts/UseTargetFrameworks.ps1 +++ b/common/Scripts/UseTargetFrameworks.ps1 @@ -15,11 +15,11 @@ else { git update-index --assume-unchanged ../Labs.TargetFrameworks.props } -$WasmTfm = "WasmLibTargetFramework"; $UwpTfm = "UwpTargetFramework"; $WinAppSdkTfm = "WinAppSdkTargetFramework"; -$WpfTfm = "WpfLibTargetFramework"; -$GtkTfm = "LinuxLibTargetFramework"; +$WasmTfm = "NetStandardCommonTargetFramework"; +$WpfTfm = "NetStandardCommonTargetFramework"; +$GtkTfm = "NetStandardCommonTargetFramework"; $macOSTfm = "MacOSLibTargetFramework"; $iOSTfm = "iOSLibTargetFramework"; $DroidTfm = "AndroidLibTargetFramework"; diff --git a/labs/CanvasLayout/samples/CanvasLayout.Sample/CanvasLayout.Sample.csproj b/labs/CanvasLayout/samples/CanvasLayout.Sample/CanvasLayout.Sample.csproj index ed0dd8119..a5beb8062 100644 --- a/labs/CanvasLayout/samples/CanvasLayout.Sample/CanvasLayout.Sample.csproj +++ b/labs/CanvasLayout/samples/CanvasLayout.Sample/CanvasLayout.Sample.csproj @@ -38,8 +38,6 @@ - - WinUITarget=$(WinUITarget) - + From ba81d0498ff6247189b8721f815765e7d09092c0 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Thu, 14 Apr 2022 11:52:15 -0500 Subject: [PATCH 12/20] Sync uno packages to the same version --- common/Labs.Uno.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/Labs.Uno.props b/common/Labs.Uno.props index 47f4a7184..de1f04646 100644 --- a/common/Labs.Uno.props +++ b/common/Labs.Uno.props @@ -28,7 +28,7 @@ - + @@ -40,6 +40,6 @@ - + From 01cc3541b34f04255058096edb423cb6f026e82f Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Thu, 14 Apr 2022 13:20:08 -0500 Subject: [PATCH 13/20] Add PackageIdVariant for generating different packages for WinUI 2 and 3 --- common/Labs.Uno.props | 2 ++ common/Scripts/UseUnoWinUI.ps1 | 2 ++ .../src/CommunityToolkit.Labs.WinUI.CanvasLayout.csproj | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/common/Labs.Uno.props b/common/Labs.Uno.props index de1f04646..1f6ef9c5f 100644 --- a/common/Labs.Uno.props +++ b/common/Labs.Uno.props @@ -21,6 +21,8 @@ True $(DefineConstants); + + Uwp diff --git a/common/Scripts/UseUnoWinUI.ps1 b/common/Scripts/UseUnoWinUI.ps1 index c19bb4a5f..75ab40d88 100644 --- a/common/Scripts/UseUnoWinUI.ps1 +++ b/common/Scripts/UseUnoWinUI.ps1 @@ -19,11 +19,13 @@ $fileContents = Get-Content -Path ../Labs.Uno.props if ($targets -eq "3") { $fileContents = $fileContents -replace 'Uno.UI', 'Uno.WinUI'; + $fileContents = $fileContents -replace 'Uwp', 'WinUI'; $fileContents = $fileContents -replace '\$\(DefineConstants\);', '$(DefineConstants);WINAPPSDK;'; } if ($targets -eq "2") { $fileContents = $fileContents -replace 'Uno.WinUI', 'Uno.UI'; + $fileContents = $fileContents -replace 'WinUI', 'Uwp'; $fileContents = $fileContents -replace 'WINAPPSDK;', ''; } diff --git a/labs/CanvasLayout/src/CommunityToolkit.Labs.WinUI.CanvasLayout.csproj b/labs/CanvasLayout/src/CommunityToolkit.Labs.WinUI.CanvasLayout.csproj index be7d35e73..555ac1cc3 100644 --- a/labs/CanvasLayout/src/CommunityToolkit.Labs.WinUI.CanvasLayout.csproj +++ b/labs/CanvasLayout/src/CommunityToolkit.Labs.WinUI.CanvasLayout.csproj @@ -6,7 +6,7 @@ - CommunityToolkit.Labs.WinUI.CanvasLayout + CommunityToolkit.Labs.$(PackageIdVariant).CanvasLayout This package contains a CanvasLayout Layout for ItemsRepeater. From 2a8131a8e3566f50abaa5e8cf2636c7817785e27 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Thu, 14 Apr 2022 13:33:33 -0500 Subject: [PATCH 14/20] Add WinUI 3 build validation --- .github/workflows/build.yml | 85 ++++++++++++++++++++++++++++++++++++- 1 file changed, 83 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8655cb0cb..1f71aa2bb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,8 +17,8 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This workflow contains a single job called "build" - build: + # This workflow contains a single job called "Build WinUI 2" + Build WinUI 2: # The type of runner that the job will run on runs-on: windows-latest @@ -95,6 +95,87 @@ jobs: path: './TestResults/*.trx' reporter: dotnet-trx + # This workflow contains a single job called "Build WinUI 3" + Build WinUI 3: + # The type of runner that the job will run on + runs-on: windows-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Needed until XAML Styler updates to .NET 6 + - name: Install .NET Core 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.x' + + - name: Install .NET 6 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0.201' + + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Checkout Repository + uses: actions/checkout@v2 + + # Restore Tools from Manifest list in the Repository + - name: Restore dotnet tools + run: dotnet tool restore + + - name: Check XAML Styling + run: ./ApplyXamlStyling.ps1 -Passive + + - name: Run Uno Check to Install Dependencies + run: dotnet tool run uno-check --ci --fix --non-interactive --skip wsl --skip androidemulator #--verbose + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.0.3 + + - name: Enable all TargetFrameworks + working-directory: ./common/Scripts/ + run: ./UseTargetFrameworks.ps1 all + + - name: Enable WinUI 3 + working-directory: ./common/Scripts/ + run: ./UseUnoWinUI.ps1 3 + + - name: MSBuild + # working-directory: ./ + run: msbuild.exe Toolkit.Labs.All.sln /restore -p:Configuration=Release + + # Build All Packages - TODO: Detect experiments + - name: pack CanvasLayout + working-directory: ./labs/CanvasLayout/src + run: msbuild -t:pack /p:Configuration=Release /p:DebugType=Portable + + # Push Packages to our DevOps Artifacts Feed + - name: Add source + run: dotnet nuget add source "https://pkgs.dev.azure.com/dotnet/CommunityToolkit/_packaging/CommunityToolkit-Labs/nuget/v3/index.json" --name LabsFeed --username dummy --password ${{ secrets.DEVOPS_PACKAGE_PUSH_TOKEN }} + + - name: Push packages + if: ${{github.ref == 'refs/heads/main'}} + run: dotnet nuget push "**/*.nupkg" --api-key dummy --source LabsFeed --skip-duplicate + + # Run tests + - name: Setup VSTest Path + uses: darenm/Setup-VSTest@v1 + + - name: Run SourceGenerators tests + run: vstest.console.exe ./Common/CommunityToolkit.Labs.Core.SourceGenerators.Tests/CommunityToolkit.Labs.Core.SourceGenerators.Tests/bin/Release/net6.0/CommunityToolkit.Labs.Core.SourceGenerators.Tests.dll /logger:"trx;LogFileName=SourceGenerators.trx" + + - name: Run experiment tests against UWP + run: vstest.console.exe ./Tests/**/CommunityToolkit.Labs.UnitTests.UWP.build.appxrecipe /Framework:FrameworkUap10 /logger:"trx;LogFileName=UWP.trx" + + - name: Run experiment tests against WinAppSDK + run: vstest.console.exe ./Tests/**/CommunityToolkit.Labs.UnitTests.WinAppSdk.build.appxrecipe /Framework:FrameworkUap10 /logger:"trx;LogFileName=WinAppSdk.trx" + + - name: Create test reports + uses: dorny/test-reporter@v1 + if: success() || failure() # run this step even if previous step failed + with: + name: Test results + path: './TestResults/*.trx' + reporter: dotnet-trx + # Test/temp job to build a single experiment to ensure our changes work for both our main types of solutions at the moment experiment: runs-on: windows-latest From 3e0f879d026067b890e04853e60977e6d9310177 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Thu, 14 Apr 2022 13:40:30 -0500 Subject: [PATCH 15/20] Fixed workflow names --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1f71aa2bb..5d13d02f0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,8 +17,8 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This workflow contains a single job called "Build WinUI 2" - Build WinUI 2: + # This workflow contains a single job called "Build-WinUI-2" + Build-WinUI-2: # The type of runner that the job will run on runs-on: windows-latest @@ -95,8 +95,8 @@ jobs: path: './TestResults/*.trx' reporter: dotnet-trx - # This workflow contains a single job called "Build WinUI 3" - Build WinUI 3: + # This workflow contains a single job called "Build-WinUI-3" + Build-WinUI-3: # The type of runner that the job will run on runs-on: windows-latest From f7da11d16dea53861dba8086805441afe1366a31 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Thu, 14 Apr 2022 14:15:40 -0500 Subject: [PATCH 16/20] Split XAML style check into separate job --- .github/workflows/build.yml | 43 +++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5d13d02f0..dd62423e6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,12 +24,6 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Needed until XAML Styler updates to .NET 6 - - name: Install .NET Core 3.1 SDK - uses: actions/setup-dotnet@v1 - with: - dotnet-version: '3.1.x' - - name: Install .NET 6 SDK uses: actions/setup-dotnet@v1 with: @@ -43,9 +37,6 @@ jobs: - name: Restore dotnet tools run: dotnet tool restore - - name: Check XAML Styling - run: ./ApplyXamlStyling.ps1 -Passive - - name: Run Uno Check to Install Dependencies run: dotnet tool run uno-check --ci --fix --non-interactive --skip wsl --skip androidemulator #--verbose @@ -73,7 +64,6 @@ jobs: if: ${{github.ref == 'refs/heads/main'}} run: dotnet nuget push "**/*.nupkg" --api-key dummy --source LabsFeed --skip-duplicate - # Run tests - name: Setup VSTest Path uses: darenm/Setup-VSTest@v1 @@ -102,12 +92,6 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Needed until XAML Styler updates to .NET 6 - - name: Install .NET Core 3.1 SDK - uses: actions/setup-dotnet@v1 - with: - dotnet-version: '3.1.x' - - name: Install .NET 6 SDK uses: actions/setup-dotnet@v1 with: @@ -121,9 +105,6 @@ jobs: - name: Restore dotnet tools run: dotnet tool restore - - name: Check XAML Styling - run: ./ApplyXamlStyling.ps1 -Passive - - name: Run Uno Check to Install Dependencies run: dotnet tool run uno-check --ci --fix --non-interactive --skip wsl --skip androidemulator #--verbose @@ -175,6 +156,30 @@ jobs: name: Test results path: './TestResults/*.trx' reporter: dotnet-trx + + # This workflow contains a single job called "Xaml-Style-Check" + Xaml-Style-Check: + # The type of runner that the job will run on + runs-on: windows-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Needed until XAML Styler updates to .NET 6 + - name: Install .NET Core 3.1 SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.x' + + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Checkout Repository + uses: actions/checkout@v2 + + # Restore Tools from Manifest list in the Repository + - name: Restore dotnet tools + run: dotnet tool restore + + - name: Check XAML Styling + run: ./ApplyXamlStyling.ps1 -Passive # Test/temp job to build a single experiment to ensure our changes work for both our main types of solutions at the moment experiment: From 4c5d2a9246c1ca218b4dbff87e2779921f35d204 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Tue, 19 Apr 2022 12:26:38 -0500 Subject: [PATCH 17/20] Remove duplicate package reference --- common/Labs.Wasm.props | 1 - 1 file changed, 1 deletion(-) diff --git a/common/Labs.Wasm.props b/common/Labs.Wasm.props index 0b5596454..0eb1f9bc4 100644 --- a/common/Labs.Wasm.props +++ b/common/Labs.Wasm.props @@ -36,7 +36,6 @@ - From 66c04b4db7db7fa53201604881382191ff49271d Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Tue, 19 Apr 2022 12:27:12 -0500 Subject: [PATCH 18/20] Cleanup / simplify window activation --- .../CommunityToolkit.Labs.Shared/App.xaml.cs | 39 ++++--------------- 1 file changed, 8 insertions(+), 31 deletions(-) diff --git a/common/CommunityToolkit.Labs.Shared/App.xaml.cs b/common/CommunityToolkit.Labs.Shared/App.xaml.cs index 60048da08..1e80ce84c 100644 --- a/common/CommunityToolkit.Labs.Shared/App.xaml.cs +++ b/common/CommunityToolkit.Labs.Shared/App.xaml.cs @@ -56,50 +56,27 @@ public App() /// Details about the launch request and process. protected override void OnLaunched(LaunchActivatedEventArgs e) { - Frame? rootFrame = null; - #if WINAPPSDK - var window = new Window(); -#else - rootFrame = currentWindow.Content as Frame; + currentWindow = new Window(); #endif // Do not repeat app initialization when the Window already has content, // just ensure that the window is active - if (rootFrame == null) + if (currentWindow.Content is not Frame rootFrame) { // Create a Frame to act as the navigation context and navigate to the first page - rootFrame = new Frame(); + currentWindow.Content = rootFrame = new Frame(); rootFrame.NavigationFailed += OnNavigationFailed; - -#if WINAPPSDK - window.Content = rootFrame; -#else - // Place the frame in the current Window - currentWindow.Content = rootFrame; -#endif } - -#if WINAPPSDK - rootFrame.Navigate(typeof(AppLoadingView), e.Arguments); - window.Activate(); -#else +#if !WINAPPSDK if (e.PrelaunchActivated == false) - { - if (rootFrame is null) - throw new InvalidOperationException("Cannot display app content, root frame is missing."); - - if (rootFrame.Content == null) - { - rootFrame.Navigate(typeof(AppLoadingView), e.Arguments); - } - - // Ensure the current window is active - currentWindow.Activate(); - } #endif + rootFrame.Navigate(typeof(AppLoadingView), e.Arguments); + + // Ensure the current window is active + currentWindow.Activate(); } /// From fe6fa69908a3c90cdab65d41d088be69e641d46e Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 20 Apr 2022 12:26:21 -0500 Subject: [PATCH 19/20] Add warning messages about branch switching when --assume-unchanged is used --- common/Scripts/UseTargetFrameworks.ps1 | 3 ++- common/Scripts/UseUnoWinUI.ps1 | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/Scripts/UseTargetFrameworks.ps1 b/common/Scripts/UseTargetFrameworks.ps1 index 64371fb68..256008db8 100644 --- a/common/Scripts/UseTargetFrameworks.ps1 +++ b/common/Scripts/UseTargetFrameworks.ps1 @@ -8,10 +8,11 @@ Param ( ) if ($allowGitChanges.IsPresent) { - Write-Warning "Changes to the default TargetFrameworks in Labs can now be committed. Run this command again without the --allow-git-changes flag to disable committing further changes."; + Write-Warning "Changes to the default TargetFrameworks in Labs can now be committed. Run this command again without the -allowGitChanges flag to disable committing further changes."; git update-index --no-assume-unchanged ../Labs.TargetFrameworks.props } else { + Write-Output "Changes to the default TargetFrameworks in Labs are now suppressed. To switch branches, run git reset --hard with a clean working tree."; git update-index --assume-unchanged ../Labs.TargetFrameworks.props } diff --git a/common/Scripts/UseUnoWinUI.ps1 b/common/Scripts/UseUnoWinUI.ps1 index 75ab40d88..06451ac93 100644 --- a/common/Scripts/UseUnoWinUI.ps1 +++ b/common/Scripts/UseUnoWinUI.ps1 @@ -8,10 +8,11 @@ Param ( ) if ($allowGitChanges.IsPresent) { - Write-Warning "Changes to the default Uno package reference in Labs can now be committed. Run this command again without the --allow-git-changes flag to disable committing further changes."; + Write-Warning "Changes to the default Uno package references in Labs can now be committed. Run this command again without the -allowGitChanges flag to disable committing further changes."; git update-index --no-assume-unchanged ../Labs.Uno.props } else { + Write-Output "Changes the default Uno package references in Labs are now suppressed. To switch branches, run git reset --hard with a clean working tree."; git update-index --assume-unchanged ../Labs.Uno.props } From a82bf2a1d2a13b96bc9decba9b918a041b4d347a Mon Sep 17 00:00:00 2001 From: michael-hawker <24302614+michael-hawker@users.noreply.github.com> Date: Wed, 20 Apr 2022 11:48:00 -0700 Subject: [PATCH 20/20] Add verbose flag for uno check --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dd62423e6..ef5782c8d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,7 +38,7 @@ jobs: run: dotnet tool restore - name: Run Uno Check to Install Dependencies - run: dotnet tool run uno-check --ci --fix --non-interactive --skip wsl --skip androidemulator #--verbose + run: dotnet tool run uno-check --ci --fix --non-interactive --skip wsl --skip androidemulator --verbose - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v1.0.3 @@ -106,7 +106,7 @@ jobs: run: dotnet tool restore - name: Run Uno Check to Install Dependencies - run: dotnet tool run uno-check --ci --fix --non-interactive --skip wsl --skip androidemulator #--verbose + run: dotnet tool run uno-check --ci --fix --non-interactive --skip wsl --skip androidemulator --verbose - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v1.0.3