From 11c73f2929eeedbfbe99ef0b99dd33d5823ccbc7 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Tue, 5 Nov 2024 21:42:00 -0500 Subject: [PATCH] chore: Adjust skiasharp defaults --- .../run-netcore-mobile-template-tests.ps1 | 10 +++---- doc/articles/uno-build-error-codes.md | 12 ++++++++ .../5.1/uno51blank/Directory.Packages.props | 22 +++++++-------- .../5.1/uno51blank/uno51blank/App.cs | 4 ++- .../uno51recommended/Directory.Packages.props | 28 +++++++++---------- .../uno51recommended/uno51recommended/App.cs | 4 ++- .../uno52AppWithLib/App.xaml.cs | 4 ++- .../uno52AppWithLib/uno52AppWithLib.csproj | 4 +-- .../uno52emptylib/uno52emptylib.csproj | 4 +-- .../uno52AppWithLib/uno52lib/uno52lib.csproj | 4 +-- .../5.2/uno52Lib/uno52Lib.csproj | 2 +- .../5.2/uno52NuGetLib/uno52NuGetLib.csproj | 2 +- .../uno52SingleProjectLib.csproj | 2 +- .../5.2/uno52blank/uno52blank/App.xaml.cs | 4 ++- .../uno52blank/uno52blank/uno52blank.csproj | 4 +-- .../uno53net9blank/uno53net9blank.csproj | 4 +-- src/Uno.Sdk/packages.json | 4 +-- ...no.Implicit.Packages.ProjectSystem.targets | 5 +++- .../HotReload/WindowExtensions.cs | 4 +-- 19 files changed, 75 insertions(+), 52 deletions(-) diff --git a/build/test-scripts/run-netcore-mobile-template-tests.ps1 b/build/test-scripts/run-netcore-mobile-template-tests.ps1 index f5321ab109e4..6ade5a2ce156 100644 --- a/build/test-scripts/run-netcore-mobile-template-tests.ps1 +++ b/build/test-scripts/run-netcore-mobile-template-tests.ps1 @@ -271,16 +271,16 @@ $projects = @(1, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-f", "net8.0-desktop", $sdkFeatures), @("macOS", "NetCore")), # Default mode for the template is WindowsAppSDKSelfContained=true, which requires specifying a target platform. - @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:Platform=x86" , "-p:TargetFramework=net8.0-windows10.0.19041"), @()), - @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:Platform=arm64" , "-p:TargetFramework=net8.0-windows10.0.19041"), @()), + @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:Platform=x86" , "-p:TargetFramework=net8.0-windows10.0.26100"), @()), + @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:Platform=arm64" , "-p:TargetFramework=net8.0-windows10.0.26100"), @()), # Ensure that default without platform builds properly - @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:TargetFramework=net8.0-windows10.0.19041"), @()), + @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:TargetFramework=net8.0-windows10.0.26100"), @()), # Validate building inside VS @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:BuildingInsideVisualStudio=true"), @("NetCore")), @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:BuildingInsideVisualStudio=true", "-p:_UnoSelectedTargetFramework=net8.0-desktop"), @("NetCore")), - @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:BuildingInsideVisualStudio=true", "-p:_UnoSelectedTargetFramework=net8.0-windows10.0.19041"), @()), + @(2, "5.2/uno52blank/uno52blank/uno52blank.csproj", @("-p:BuildingInsideVisualStudio=true", "-p:_UnoSelectedTargetFramework=net8.0-windows10.0.26100"), @()), # # 5.2 Uno Lib @@ -301,7 +301,7 @@ $projects = @(2, "5.2/uno52NuGetLib/uno52NuGetLib.csproj", @(), @("macOS", "NetCore")), # Default mode for the template is WindowsAppSDKSelfContained=true, which requires specifying a target platform. - @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-p:Platform=x86" , "-p:TargetFramework=net8.0-windows10.0.19041"), @("macOS")), + @(2, "5.2/uno52Lib/uno52Lib.csproj", @("-p:Platform=x86" , "-p:TargetFramework=net8.0-windows10.0.26100"), @("macOS")), # # 5.2 Uno SingleProject Lib diff --git a/doc/articles/uno-build-error-codes.md b/doc/articles/uno-build-error-codes.md index 938187ee28bd..4aa58ec23bb7 100644 --- a/doc/articles/uno-build-error-codes.md +++ b/doc/articles/uno-build-error-codes.md @@ -178,6 +178,18 @@ Some components like `ProgressRing` and `MediaPlayerElement` requires you to ref - For `ProgressRing`, it requires Lottie dependency. For more information about adding Lottie to your project, see [Lottie for Uno](xref:Uno.Features.Lottie). - For `MediaPlayerElement` on WebAssembly or Gtk, it requires `Uno.WinUI.MediaPlayer.WebAssembly` or `Uno.WinUI.MediaPlayer.Skia.Gtk` NuGet package. For more information, see [MediaPlayerElement](xref:Uno.Controls.MediaPlayerElement). +### UNO0008 + +In Uno Platform 5.5, the `EnableHotReload` method has been deprecated and replaced by `UseStudio()`. + +Note that this change only applies to projects using the Uno.Sdk. If you're not using the Uno.Sdk, you can disable this warning using the following code: + +```xml +#pragma warning disable UNO0008 // Replace with UseStudio() when migrating to the Uno.Sdk. +window.EnableHotReload(); +#pragma warning restore UNO0008 +``` + ## XAML Errors ### UNOX0001 diff --git a/src/SolutionTemplate/5.1/uno51blank/Directory.Packages.props b/src/SolutionTemplate/5.1/uno51blank/Directory.Packages.props index 296df9d6fe5a..ef290f97a282 100644 --- a/src/SolutionTemplate/5.1/uno51blank/Directory.Packages.props +++ b/src/SolutionTemplate/5.1/uno51blank/Directory.Packages.props @@ -10,17 +10,17 @@ - - - - - - - - - - - + + + + + + + + + + + diff --git a/src/SolutionTemplate/5.1/uno51blank/uno51blank/App.cs b/src/SolutionTemplate/5.1/uno51blank/uno51blank/App.cs index b52a5c4e507a..a1f60a65781f 100644 --- a/src/SolutionTemplate/5.1/uno51blank/uno51blank/App.cs +++ b/src/SolutionTemplate/5.1/uno51blank/uno51blank/App.cs @@ -9,7 +9,9 @@ protected override void OnLaunched(LaunchActivatedEventArgs args) MainWindow = new Window(); #if DEBUG - MainWindow.UseStudio(); +#pragma warning disable UNO0008 + MainWindow.EnableHotReload(); +#pragma warning restore UNO0008 #endif diff --git a/src/SolutionTemplate/5.1/uno51recommended/Directory.Packages.props b/src/SolutionTemplate/5.1/uno51recommended/Directory.Packages.props index 1cb2d22cd667..bf4abe062445 100644 --- a/src/SolutionTemplate/5.1/uno51recommended/Directory.Packages.props +++ b/src/SolutionTemplate/5.1/uno51recommended/Directory.Packages.props @@ -17,17 +17,17 @@ - - - - - - - - - - - + + + + + + + + + + + @@ -52,10 +52,10 @@ - + - - + + diff --git a/src/SolutionTemplate/5.1/uno51recommended/uno51recommended/App.cs b/src/SolutionTemplate/5.1/uno51recommended/uno51recommended/App.cs index 02b6c1e4e73d..7f9bc9aacef4 100644 --- a/src/SolutionTemplate/5.1/uno51recommended/uno51recommended/App.cs +++ b/src/SolutionTemplate/5.1/uno51recommended/uno51recommended/App.cs @@ -75,7 +75,9 @@ protected async override void OnLaunched(LaunchActivatedEventArgs args) MainWindow = builder.Window; #if DEBUG - MainWindow.UseStudio(); +#pragma warning disable UNO0008 + MainWindow.EnableHotReload(); +#pragma warning restore UNO0008 #endif Host = await builder.NavigateAsync(); diff --git a/src/SolutionTemplate/5.2/uno52AppWithLib/uno52AppWithLib/App.xaml.cs b/src/SolutionTemplate/5.2/uno52AppWithLib/uno52AppWithLib/App.xaml.cs index bf27f78b2815..0f72526ed656 100644 --- a/src/SolutionTemplate/5.2/uno52AppWithLib/uno52AppWithLib/App.xaml.cs +++ b/src/SolutionTemplate/5.2/uno52AppWithLib/uno52AppWithLib/App.xaml.cs @@ -21,7 +21,9 @@ protected override void OnLaunched(LaunchActivatedEventArgs args) { MainWindow = new Window(); #if DEBUG - MainWindow.UseStudio(); +#pragma warning disable UNO0008 + MainWindow.EnableHotReload(); +#pragma warning restore UNO0008 #endif diff --git a/src/SolutionTemplate/5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj b/src/SolutionTemplate/5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj index e7d30b60c49b..66c4752e55b7 100644 --- a/src/SolutionTemplate/5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj +++ b/src/SolutionTemplate/5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj @@ -2,7 +2,7 @@ net8.0-browserwasm;net8.0-desktop;net8.0 $(TargetFrameworks);net8.0-android;net8.0-ios;net8.0-maccatalyst;net8.0-desktop - $(TargetFrameworks);net8.0-windows10.0.19041 + $(TargetFrameworks);net8.0-windows10.0.26100 $(TargetFrameworks.Replace('net8.0-android','')) @@ -52,7 +52,7 @@ BeforeTargets="AfterBuild"> + Condition=" '$(TargetFramework)' == 'net8.0-windows10.0.26100' OR '$(TargetFramework)' == 'net8.0-desktop' "> <_AssetsToValidate Include="$(OutputPath)Assets\SharedAssets.md" /> <_AssetsToValidate Include="$(OutputPath)Assets\Icons\icon_foreground.png" /> diff --git a/src/SolutionTemplate/5.2/uno52AppWithLib/uno52emptylib/uno52emptylib.csproj b/src/SolutionTemplate/5.2/uno52AppWithLib/uno52emptylib/uno52emptylib.csproj index 4c1a25d4673f..194ad396fa14 100644 --- a/src/SolutionTemplate/5.2/uno52AppWithLib/uno52emptylib/uno52emptylib.csproj +++ b/src/SolutionTemplate/5.2/uno52AppWithLib/uno52emptylib/uno52emptylib.csproj @@ -2,7 +2,7 @@ net8.0-browserwasm;net8.0-desktop;net8.0 $(TargetFrameworks);net8.0-android;net8.0-ios;net8.0-maccatalyst;net8.0-desktop - $(TargetFrameworks);net8.0-windows10.0.19041 + $(TargetFrameworks);net8.0-windows10.0.26100 $(TargetFrameworks.Replace('net8.0-android','')) @@ -39,4 +39,4 @@ - \ No newline at end of file + diff --git a/src/SolutionTemplate/5.2/uno52AppWithLib/uno52lib/uno52lib.csproj b/src/SolutionTemplate/5.2/uno52AppWithLib/uno52lib/uno52lib.csproj index 3b536a6df335..45540750ad7a 100644 --- a/src/SolutionTemplate/5.2/uno52AppWithLib/uno52lib/uno52lib.csproj +++ b/src/SolutionTemplate/5.2/uno52AppWithLib/uno52lib/uno52lib.csproj @@ -2,7 +2,7 @@ net8.0-browserwasm;net8.0-desktop;net8.0 $(TargetFrameworks);net8.0-android;net8.0-ios;net8.0-maccatalyst;net8.0-desktop - $(TargetFrameworks);net8.0-windows10.0.19041 + $(TargetFrameworks);net8.0-windows10.0.26100 $(TargetFrameworks.Replace('net8.0-android','')) @@ -39,4 +39,4 @@ - \ No newline at end of file + diff --git a/src/SolutionTemplate/5.2/uno52Lib/uno52Lib.csproj b/src/SolutionTemplate/5.2/uno52Lib/uno52Lib.csproj index ef105687423f..fedfadc3f2d5 100644 --- a/src/SolutionTemplate/5.2/uno52Lib/uno52Lib.csproj +++ b/src/SolutionTemplate/5.2/uno52Lib/uno52Lib.csproj @@ -1,6 +1,6 @@ - net8.0;net8.0-ios;net8.0-maccatalyst;net8.0-windows10.0.19041;net8.0-browserwasm;net8.0-desktop + net8.0;net8.0-ios;net8.0-maccatalyst;net8.0-windows10.0.26100;net8.0-browserwasm;net8.0-desktop $(TargetFrameworks);net8.0-android diff --git a/src/SolutionTemplate/5.2/uno52NuGetLib/uno52NuGetLib.csproj b/src/SolutionTemplate/5.2/uno52NuGetLib/uno52NuGetLib.csproj index ceb179b8eb27..3f8e15879332 100644 --- a/src/SolutionTemplate/5.2/uno52NuGetLib/uno52NuGetLib.csproj +++ b/src/SolutionTemplate/5.2/uno52NuGetLib/uno52NuGetLib.csproj @@ -1,6 +1,6 @@ - net8.0;net8.0-ios;net8.0-maccatalyst;net8.0-windows10.0.19041;net8.0-browserwasm;net8.0-desktop + net8.0;net8.0-ios;net8.0-maccatalyst;net8.0-windows10.0.26100;net8.0-browserwasm;net8.0-desktop $(TargetFrameworks);net8.0-android diff --git a/src/SolutionTemplate/5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj b/src/SolutionTemplate/5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj index c2bd98afb43f..88cdd66cf72f 100644 --- a/src/SolutionTemplate/5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj +++ b/src/SolutionTemplate/5.2/uno52SingleProjectLib/uno52SingleProjectLib.csproj @@ -1,6 +1,6 @@ - net8.0;net8.0-ios;net8.0-maccatalyst;net8.0-windows10.0.19041;net8.0-browserwasm;net8.0-desktop + net8.0;net8.0-ios;net8.0-maccatalyst;net8.0-windows10.0.26100;net8.0-browserwasm;net8.0-desktop $(TargetFrameworks);net8.0-android diff --git a/src/SolutionTemplate/5.2/uno52blank/uno52blank/App.xaml.cs b/src/SolutionTemplate/5.2/uno52blank/uno52blank/App.xaml.cs index 1979f64729ea..0afcd05f0c42 100644 --- a/src/SolutionTemplate/5.2/uno52blank/uno52blank/App.xaml.cs +++ b/src/SolutionTemplate/5.2/uno52blank/uno52blank/App.xaml.cs @@ -21,7 +21,9 @@ protected override void OnLaunched(LaunchActivatedEventArgs args) { MainWindow = new Window(); #if DEBUG - MainWindow.UseStudio(); +#pragma warning disable UNO0008 + MainWindow.EnableHotReload(); +#pragma warning restore UNO0008 #endif diff --git a/src/SolutionTemplate/5.2/uno52blank/uno52blank/uno52blank.csproj b/src/SolutionTemplate/5.2/uno52blank/uno52blank/uno52blank.csproj index 20a7d5370285..b2359027a9da 100644 --- a/src/SolutionTemplate/5.2/uno52blank/uno52blank/uno52blank.csproj +++ b/src/SolutionTemplate/5.2/uno52blank/uno52blank/uno52blank.csproj @@ -2,7 +2,7 @@ net8.0-browserwasm;net8.0-desktop;net8.0 $(TargetFrameworks);net8.0-android;net8.0-ios;net8.0-maccatalyst;net8.0-desktop - $(TargetFrameworks);net8.0-windows10.0.19041 + $(TargetFrameworks);net8.0-windows10.0.26100 $(TargetFrameworks.Replace('net8.0-android','')) @@ -46,7 +46,7 @@ + Condition="'$(TargetFramework)'=='net8.0-windows10.0.26100'"> net9.0-browserwasm;net9.0-desktop;net9.0 $(TargetFrameworks);net9.0-android;net9.0-ios;net9.0-maccatalyst;net9.0-desktop - $(TargetFrameworks);net9.0-windows10.0.19041 + $(TargetFrameworks);net9.0-windows10.0.26100 $(TargetFrameworks.Replace('net9.0-android','')) @@ -65,7 +65,7 @@ BeforeTargets="AfterBuild"> + Condition=" '$(TargetFramework)' == 'net9.0-windows10.0.26100' OR '$(TargetFramework)' == 'net9.0-desktop' "> <_AssetsToValidate Include="$(OutputPath)Assets\SharedAssets.md" /> <_AssetsToValidate Include="$(OutputPath)Assets\Icons\icon_foreground.png" /> diff --git a/src/Uno.Sdk/packages.json b/src/Uno.Sdk/packages.json index 56348beaf653..270943c51d98 100644 --- a/src/Uno.Sdk/packages.json +++ b/src/Uno.Sdk/packages.json @@ -87,14 +87,14 @@ }, { "group": "hotdesign", - "version": "1.0.0-dev.3", + "version": "1.0.0-dev.17", "packages": [ "Uno.UI.HotDesign" ] }, { "group": "SkiaSharp", - "version": "2.88.8", + "version": "2.88.9-preview.2.2", "packages": [ "SkiaSharp.Skottie", "SkiaSharp.Views.Uno.WinUI", diff --git a/src/Uno.Sdk/targets/Uno.Implicit.Packages.ProjectSystem.targets b/src/Uno.Sdk/targets/Uno.Implicit.Packages.ProjectSystem.targets index ce5194b7d6b3..7b02dded7571 100644 --- a/src/Uno.Sdk/targets/Uno.Implicit.Packages.ProjectSystem.targets +++ b/src/Uno.Sdk/targets/Uno.Implicit.Packages.ProjectSystem.targets @@ -9,7 +9,10 @@ <_UnoProjectSystemPackageReference Include="Uno.Resizetizer" ProjectSystem="true" PrivateAssets="all" /> <_UnoProjectSystemPackageReference Include="Uno.Sdk.Extras" ProjectSystem="true" PrivateAssets="all" /> <_UnoProjectSystemPackageReference Include="Uno.Settings.DevServer" ProjectSystem="true" PrivateAssets="all" /> - <_UnoProjectSystemPackageReference Include="Uno.UI.HotDesign" ProjectSystem="true" PrivateAssets="all" /> + + + + <_UnoProjectSystemPackageReference Include="Uno.UI.HotDesign" ProjectSystem="true" PrivateAssets="all" Condition=" '$(Optimize)' != 'true' " /> diff --git a/src/Uno.UI.RemoteControl/HotReload/WindowExtensions.cs b/src/Uno.UI.RemoteControl/HotReload/WindowExtensions.cs index 4c3db93087f1..45defc62fbb2 100644 --- a/src/Uno.UI.RemoteControl/HotReload/WindowExtensions.cs +++ b/src/Uno.UI.RemoteControl/HotReload/WindowExtensions.cs @@ -15,7 +15,7 @@ public static class WindowExtensions /// Enables the UI Update cycle of HotReload to be handled by Uno /// /// The window of the application where UI updates will be applied - [Obsolete("Use the UseStudio() method instead", DiagnosticId = "UNO0008", UrlFormat = "https://aka.platform.uno/UNO0008")] + [Obsolete("Use the UseStudio() method instead if using the Uno.SDK, otherwise see https://aka.platform.uno/UNO0008 for more details.", DiagnosticId = "UNO0008", UrlFormat = "https://aka.platform.uno/UNO0008")] [Browsable(false)] [EditorBrowsable(EditorBrowsableState.Never)] public static void EnableHotReload(this Window window) @@ -26,7 +26,7 @@ public static void EnableHotReload(this Window window) /// /// The window of the application where UI updates will be applied /// Request to not show the on-canvas indicator by default. - [Obsolete("Use the UseStudio() method instead", DiagnosticId = "UNO0008", UrlFormat = "https://aka.platform.uno/UNO0008")] + [Obsolete("Use the UseStudio() method instead if using the Uno.SDK, otherwise see https://aka.platform.uno/UNO0008 for more details.", DiagnosticId = "UNO0008", UrlFormat = "https://aka.platform.uno/UNO0008")] [Browsable(false)] [EditorBrowsable(EditorBrowsableState.Never)] public static void EnableHotReload(this Window window, bool disableIndicator)