From 3268beda87dfae9d56c3fe18d3e35a0f207bee7e Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 18 Nov 2024 14:36:01 -0600 Subject: [PATCH 1/8] Upgrade .NET to 9.0, update config, add TargetFramework. --- .devcontainer/Dockerfile | 7 ++----- .devcontainer/devcontainer.json | 2 +- .github/workflows/build.yml | 2 +- MultiTarget/AvailableTargetFrameworks.props | 22 ++++++++++----------- MultiTarget/DefinedConstants.props | 1 + MultiTarget/EnabledTargetFrameworks.props | 20 +++++++++---------- MultiTarget/MultiTargetIdentifiers.props | 20 +++++++++---------- MultiTarget/PackageReferences/Uno.props | 4 ++-- MultiTarget/WinUI.Extra.props | 1 + global.json | 2 +- 10 files changed, 40 insertions(+), 41 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index c8987eb9..6935449f 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,8 +1,5 @@ -# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.208.0/containers/dotnet/.devcontainer/base.Dockerfile - -# [Choice] .NET version: 6.0, 5.0, 3.1, 6.0-bullseye, 5.0-bullseye, 3.1-bullseye, 6.0-focal, 5.0-focal, 3.1-focal -ARG VARIANT="6.0-bullseye-slim" -FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT} +# See https://github.com/devcontainers/images/tree/main/src/dotnet for image choices +FROM mcr.microsoft.com/vscode/devcontainers/dotnet:9.0 # [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 ARG NODE_VERSION="none" diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 1ff6856c..f616c78f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -7,7 +7,7 @@ "args": { // Update 'VARIANT' to pick a .NET Core version: 3.1, 5.0, 6.0 // Append -bullseye or -focal to pin to an OS version. - "VARIANT": "8.0", + "VARIANT": "9.0", // Options "NODE_VERSION": "lts/*" } diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 47051943..77214858 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ on: workflow_dispatch: env: - DOTNET_VERSION: ${{ '8.0.x' }} + DOTNET_VERSION: ${{ '9.0.x' }} ENABLE_DIAGNOSTICS: false #COREHOST_TRACE: 1 COREHOST_TRACEFILE: corehosttrace.log diff --git a/MultiTarget/AvailableTargetFrameworks.props b/MultiTarget/AvailableTargetFrameworks.props index 837c10ec..de31f307 100644 --- a/MultiTarget/AvailableTargetFrameworks.props +++ b/MultiTarget/AvailableTargetFrameworks.props @@ -1,23 +1,23 @@ uap10.0.17763 - net8.0-windows10.0.19041.0;net7.0-windows10.0.19041.0;net6.0-windows10.0.19041.0; + net9.0-windows10.0.19041.0;net8.0-windows10.0.19041.0;net7.0-windows10.0.19041.0;net6.0-windows10.0.19041.0; - net8.0 - net8.0 - net8.0 + net8.0;net9.0; + net8.0;net9.0; + net8.0;net9.0; - net8.0-android34.0 - net8.0-maccatalyst - net8.0-ios + net8.0-android34.0;net9.0-android; + net8.0-maccatalyst;net9.0-maccatalyst; + net8.0-ios;net9.0-ios; - net8.0 - net8.0 - net8.0 + net8.0;net9.0; + net8.0;net9.0; + net8.0;net9.0; netstandard2.0 - net8.0 + net8.0;net9.0; \ No newline at end of file diff --git a/MultiTarget/DefinedConstants.props b/MultiTarget/DefinedConstants.props index 41e955b7..b5c8c2c9 100644 --- a/MultiTarget/DefinedConstants.props +++ b/MultiTarget/DefinedConstants.props @@ -15,6 +15,7 @@ $(DefineConstants);HAS_UNO_SKIA;__SKIA__;WINDOWS_WPF; $(DefineConstants);HAS_UNO_SKIA;__SKIA__;__GTK__; + $(DefineConstants);NET9_0_OR_GREATER $(DefineConstants);NET8_0_OR_GREATER $(DefineConstants);NET7_0_OR_GREATER $(DefineConstants);NET6_0_OR_GREATER diff --git a/MultiTarget/EnabledTargetFrameworks.props b/MultiTarget/EnabledTargetFrameworks.props index ac1170df..32399cab 100644 --- a/MultiTarget/EnabledTargetFrameworks.props +++ b/MultiTarget/EnabledTargetFrameworks.props @@ -1,23 +1,23 @@ uap10.0.17763 - net8.0-windows10.0.19041.0;net7.0-windows10.0.19041.0;net6.0-windows10.0.19041.0; - - net8.0 - net8.0 - net8.0 + net9.0-windows10.0.19041.0;net8.0-windows10.0.19041.0;net7.0-windows10.0.19041.0;net6.0-windows10.0.19041.0; + net8.0;net9.0; + net8.0;net9.0; + net8.0;net9.0; + - net8.0 - net8.0 - net8.0 + net8.0;net9.0; + net8.0;net9.0; + net8.0;net9.0; - netstandard2.0 - net8.0 + + net8.0;net9.0; diff --git a/MultiTarget/MultiTargetIdentifiers.props b/MultiTarget/MultiTargetIdentifiers.props index 9faf2208..839737b9 100644 --- a/MultiTarget/MultiTargetIdentifiers.props +++ b/MultiTarget/MultiTargetIdentifiers.props @@ -29,25 +29,25 @@ true true - true - true + true + true true - true - true + true + true true - true - true + true + true true true true - true - true - true - true + true + true + true + true true diff --git a/MultiTarget/PackageReferences/Uno.props b/MultiTarget/PackageReferences/Uno.props index ab7ec0f3..e9907281 100644 --- a/MultiTarget/PackageReferences/Uno.props +++ b/MultiTarget/PackageReferences/Uno.props @@ -1,13 +1,13 @@ - 5.2.132 + 5.5.66 - + diff --git a/MultiTarget/WinUI.Extra.props b/MultiTarget/WinUI.Extra.props index 206362d1..88a471fb 100644 --- a/MultiTarget/WinUI.Extra.props +++ b/MultiTarget/WinUI.Extra.props @@ -23,6 +23,7 @@ + diff --git a/global.json b/global.json index 91187a7c..d413698a 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.403", + "version": "9.0.100", "rollForward": "latestFeature" }, "msbuild-sdks": From b1f505601d520ef54d7369c68202e99a6ddbc93b Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 18 Nov 2024 14:59:50 -0600 Subject: [PATCH 2/8] Adjust TargetFramework declaration to support multiple values. --- ProjectHeads/App.Head.Wasm.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProjectHeads/App.Head.Wasm.props b/ProjectHeads/App.Head.Wasm.props index 86a98d39..3c624396 100644 --- a/ProjectHeads/App.Head.Wasm.props +++ b/ProjectHeads/App.Head.Wasm.props @@ -1,7 +1,7 @@ Exe - $(WasmHeadTargetFramework) + $(WasmHeadTargetFramework.Split(';')[0]) From 89d14cb12982634dd10e8908f5eda63a73a0a81f Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Fri, 22 Nov 2024 14:25:13 -0600 Subject: [PATCH 3/8] Update packages, migrate Uno/Wasm to 9.0 --- ...nityToolkit.Tooling.SampleGen.Tests.csproj | 6 +++--- ...munityToolkit.Tooling.TestGen.Tests.csproj | 2 +- MultiTarget/AvailableTargetFrameworks.props | 20 +++++++++---------- MultiTarget/EnabledTargetFrameworks.props | 14 ++++++------- MultiTarget/PackageReferences/Uno.props | 2 +- MultiTarget/PackageReferences/WinAppSdk.props | 2 +- .../Wasm/CommunityToolkit.App.Wasm.csproj | 2 +- .../App.Head.Uno.UI.Dependencies.props | 2 +- ProjectHeads/App.Head.Uwp.Dependencies.props | 4 ++-- ProjectHeads/App.Head.Wasm.props | 15 +++++++------- .../App.Head.WinAppSdk.Dependencies.props | 2 +- ProjectHeads/App.Head.props | 6 +++--- .../Wasm/ProjectTemplate.Wasm.csproj | 2 +- ProjectHeads/Tests.Head.WinAppSdk.props | 2 +- ProjectHeads/Tests.Head.props | 4 ++-- ToolkitComponent.SampleProject.props | 2 +- 16 files changed, 44 insertions(+), 43 deletions(-) diff --git a/CommunityToolkit.Tooling.SampleGen.Tests/CommunityToolkit.Tooling.SampleGen.Tests.csproj b/CommunityToolkit.Tooling.SampleGen.Tests/CommunityToolkit.Tooling.SampleGen.Tests.csproj index a04a5fa1..3dc69337 100644 --- a/CommunityToolkit.Tooling.SampleGen.Tests/CommunityToolkit.Tooling.SampleGen.Tests.csproj +++ b/CommunityToolkit.Tooling.SampleGen.Tests/CommunityToolkit.Tooling.SampleGen.Tests.csproj @@ -9,10 +9,10 @@ - + - - + + diff --git a/CommunityToolkit.Tooling.TestGen.Tests/CommunityToolkit.Tooling.TestGen.Tests.csproj b/CommunityToolkit.Tooling.TestGen.Tests/CommunityToolkit.Tooling.TestGen.Tests.csproj index 42048be6..8c87f398 100644 --- a/CommunityToolkit.Tooling.TestGen.Tests/CommunityToolkit.Tooling.TestGen.Tests.csproj +++ b/CommunityToolkit.Tooling.TestGen.Tests/CommunityToolkit.Tooling.TestGen.Tests.csproj @@ -8,7 +8,7 @@ - + diff --git a/MultiTarget/AvailableTargetFrameworks.props b/MultiTarget/AvailableTargetFrameworks.props index de31f307..66cfcbc6 100644 --- a/MultiTarget/AvailableTargetFrameworks.props +++ b/MultiTarget/AvailableTargetFrameworks.props @@ -3,21 +3,21 @@ uap10.0.17763 net9.0-windows10.0.19041.0;net8.0-windows10.0.19041.0;net7.0-windows10.0.19041.0;net6.0-windows10.0.19041.0; - net8.0;net9.0; - net8.0;net9.0; - net8.0;net9.0; + net9.0; + net9.0; + net9.0; - net8.0-android34.0;net9.0-android; - net8.0-maccatalyst;net9.0-maccatalyst; - net8.0-ios;net9.0-ios; + net9.0-android; + net9.0-maccatalyst; + net9.0-ios; - net8.0;net9.0; - net8.0;net9.0; - net8.0;net9.0; + net9.0; + net9.0; + net9.0; netstandard2.0 - net8.0;net9.0; + net9.0; \ No newline at end of file diff --git a/MultiTarget/EnabledTargetFrameworks.props b/MultiTarget/EnabledTargetFrameworks.props index 32399cab..c3898ba2 100644 --- a/MultiTarget/EnabledTargetFrameworks.props +++ b/MultiTarget/EnabledTargetFrameworks.props @@ -3,21 +3,21 @@ uap10.0.17763 net9.0-windows10.0.19041.0;net8.0-windows10.0.19041.0;net7.0-windows10.0.19041.0;net6.0-windows10.0.19041.0; - net8.0;net9.0; - net8.0;net9.0; - net8.0;net9.0; + net9.0; + net9.0; + net9.0; - net8.0;net9.0; - net8.0;net9.0; - net8.0;net9.0; + net9.0; + net9.0; + net9.0; - net8.0;net9.0; + net9.0; diff --git a/MultiTarget/PackageReferences/Uno.props b/MultiTarget/PackageReferences/Uno.props index e9907281..cd6712c1 100644 --- a/MultiTarget/PackageReferences/Uno.props +++ b/MultiTarget/PackageReferences/Uno.props @@ -7,7 +7,7 @@ - + diff --git a/MultiTarget/PackageReferences/WinAppSdk.props b/MultiTarget/PackageReferences/WinAppSdk.props index 8f4fa3b3..286a23e4 100644 --- a/MultiTarget/PackageReferences/WinAppSdk.props +++ b/MultiTarget/PackageReferences/WinAppSdk.props @@ -1,6 +1,6 @@ - + diff --git a/ProjectHeads/AllComponents/Wasm/CommunityToolkit.App.Wasm.csproj b/ProjectHeads/AllComponents/Wasm/CommunityToolkit.App.Wasm.csproj index 1d3a7526..cb846c4d 100644 --- a/ProjectHeads/AllComponents/Wasm/CommunityToolkit.App.Wasm.csproj +++ b/ProjectHeads/AllComponents/Wasm/CommunityToolkit.App.Wasm.csproj @@ -1,4 +1,4 @@ - + true diff --git a/ProjectHeads/App.Head.Uno.UI.Dependencies.props b/ProjectHeads/App.Head.Uno.UI.Dependencies.props index 960a1391..3a4138f3 100644 --- a/ProjectHeads/App.Head.Uno.UI.Dependencies.props +++ b/ProjectHeads/App.Head.Uno.UI.Dependencies.props @@ -3,7 +3,7 @@ - + diff --git a/ProjectHeads/App.Head.Uwp.Dependencies.props b/ProjectHeads/App.Head.Uwp.Dependencies.props index 054d587c..0e6fe232 100644 --- a/ProjectHeads/App.Head.Uwp.Dependencies.props +++ b/ProjectHeads/App.Head.Uwp.Dependencies.props @@ -2,8 +2,8 @@ - + - + diff --git a/ProjectHeads/App.Head.Wasm.props b/ProjectHeads/App.Head.Wasm.props index 3c624396..f3ad1930 100644 --- a/ProjectHeads/App.Head.Wasm.props +++ b/ProjectHeads/App.Head.Wasm.props @@ -59,13 +59,14 @@ - - - - - - - + + + + + + + + diff --git a/ProjectHeads/App.Head.WinAppSdk.Dependencies.props b/ProjectHeads/App.Head.WinAppSdk.Dependencies.props index 154d4526..906e6996 100644 --- a/ProjectHeads/App.Head.WinAppSdk.Dependencies.props +++ b/ProjectHeads/App.Head.WinAppSdk.Dependencies.props @@ -2,7 +2,7 @@ - + diff --git a/ProjectHeads/App.Head.props b/ProjectHeads/App.Head.props index e391661d..f6aae2ba 100644 --- a/ProjectHeads/App.Head.props +++ b/ProjectHeads/App.Head.props @@ -8,13 +8,13 @@ - + - - + + diff --git a/ProjectHeads/SingleComponent/Wasm/ProjectTemplate.Wasm.csproj b/ProjectHeads/SingleComponent/Wasm/ProjectTemplate.Wasm.csproj index e0b6be0c..25f62528 100644 --- a/ProjectHeads/SingleComponent/Wasm/ProjectTemplate.Wasm.csproj +++ b/ProjectHeads/SingleComponent/Wasm/ProjectTemplate.Wasm.csproj @@ -1,4 +1,4 @@ - + true diff --git a/ProjectHeads/Tests.Head.WinAppSdk.props b/ProjectHeads/Tests.Head.WinAppSdk.props index 7260103d..2e306263 100644 --- a/ProjectHeads/Tests.Head.WinAppSdk.props +++ b/ProjectHeads/Tests.Head.WinAppSdk.props @@ -6,7 +6,7 @@ - + build diff --git a/ProjectHeads/Tests.Head.props b/ProjectHeads/Tests.Head.props index 0dff7352..354c480b 100644 --- a/ProjectHeads/Tests.Head.props +++ b/ProjectHeads/Tests.Head.props @@ -1,8 +1,8 @@ - - + + diff --git a/ToolkitComponent.SampleProject.props b/ToolkitComponent.SampleProject.props index d1c5e023..8b23c767 100644 --- a/ToolkitComponent.SampleProject.props +++ b/ToolkitComponent.SampleProject.props @@ -11,7 +11,7 @@ - + From 0a88074f31fa2e3be8df0d51c555cfdd30e8f998 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 18 Nov 2024 13:06:47 -0600 Subject: [PATCH 4/8] Update uno-check version to 1.27.1 in dotnet-tools.json --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 2817fea9..5a513e11 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "uno.check": { - "version": "1.20.2", + "version": "1.27.1", "commands": [ "uno-check" ] From eb0c0ebb927decf626846b46f4d0464f448d6d76 Mon Sep 17 00:00:00 2001 From: Arlo Date: Mon, 25 Nov 2024 17:29:08 -0600 Subject: [PATCH 5/8] Fixed version number for CommunityToolkit.WinUI.UI.Controls.Markdown --- ProjectHeads/App.Head.WinAppSdk.Dependencies.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProjectHeads/App.Head.WinAppSdk.Dependencies.props b/ProjectHeads/App.Head.WinAppSdk.Dependencies.props index 906e6996..154d4526 100644 --- a/ProjectHeads/App.Head.WinAppSdk.Dependencies.props +++ b/ProjectHeads/App.Head.WinAppSdk.Dependencies.props @@ -2,7 +2,7 @@ - + From 4f12e8067da05c7e884a06b558704b2f59d93ad4 Mon Sep 17 00:00:00 2001 From: Arlo Date: Mon, 25 Nov 2024 17:29:28 -0600 Subject: [PATCH 6/8] Align versions for Uno.Microsoft.Xaml.Behaviors.Uwp.Managed --- ProjectHeads/App.Head.Uno.UI.Dependencies.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProjectHeads/App.Head.Uno.UI.Dependencies.props b/ProjectHeads/App.Head.Uno.UI.Dependencies.props index 3a4138f3..5619bec9 100644 --- a/ProjectHeads/App.Head.Uno.UI.Dependencies.props +++ b/ProjectHeads/App.Head.Uno.UI.Dependencies.props @@ -3,7 +3,7 @@ - + From 3a1ee188dcb385b65eefc8430ab6ddded485f89a Mon Sep 17 00:00:00 2001 From: Arlo Date: Wed, 4 Dec 2024 12:01:47 -0600 Subject: [PATCH 7/8] Add logic to exclude conflicting MultiTargets based on WinUIMajorVersion --- Build-Toolkit-Components.ps1 | 14 ++++++++++++++ Build-Toolkit-Gallery.ps1 | 14 ++++++++++++++ GenerateAllSolution.ps1 | 14 ++++++++++++++ 3 files changed, 42 insertions(+) diff --git a/Build-Toolkit-Components.ps1 b/Build-Toolkit-Components.ps1 index 2a99ef67..c461bddd 100644 --- a/Build-Toolkit-Components.ps1 +++ b/Build-Toolkit-Components.ps1 @@ -104,6 +104,20 @@ if ($null -eq $ExcludeMultiTargets) $ExcludeMultiTargets = @() } +# Both uwp and wasdk share a targetframework. Both cannot be enabled at once. +# If both are supplied, remove one based on WinUIMajorVersion. +if ($MultiTargets.Contains('uwp') -and $MultiTargets.Contains('wasdk')) +{ + if ($WinUIMajorVersion -eq 2) + { + $ExcludeMultiTargets = $ExcludeMultiTargets + 'wasdk' + } + else + { + $ExcludeMultiTargets = $ExcludeMultiTargets + 'uwp' + } +} + $MultiTargets = $MultiTargets | Where-Object { $_ -notin $ExcludeMultiTargets } if ($Components -eq @('all')) { diff --git a/Build-Toolkit-Gallery.ps1 b/Build-Toolkit-Gallery.ps1 index b6fc3668..ec09ae91 100644 --- a/Build-Toolkit-Gallery.ps1 +++ b/Build-Toolkit-Gallery.ps1 @@ -87,6 +87,20 @@ if ($null -eq $ExcludeMultiTargets) $ExcludeMultiTargets = @() } +# Both uwp and wasdk share a targetframework. Both cannot be enabled at once. +# If both are supplied, remove one based on WinUIMajorVersion. +if ($MultiTargets.Contains('uwp') -and $MultiTargets.Contains('wasdk')) +{ + if ($WinUIMajorVersion -eq 2) + { + $ExcludeMultiTargets = $ExcludeMultiTargets + 'wasdk' + } + else + { + $ExcludeMultiTargets = $ExcludeMultiTargets + 'uwp' + } +} + if ($MultiTargets -eq 'all') { $MultiTargets = @('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard') } diff --git a/GenerateAllSolution.ps1 b/GenerateAllSolution.ps1 index 1ef1efac..f1daf804 100644 --- a/GenerateAllSolution.ps1 +++ b/GenerateAllSolution.ps1 @@ -62,6 +62,20 @@ if ($null -eq $ExcludeMultiTargets) $ExcludeMultiTargets = @() } +# Both uwp and wasdk share a targetframework. Both cannot be enabled at once. +# If both are supplied, remove one based on WinUIMajorVersion. +if ($MultiTargets.Contains('uwp') -and $MultiTargets.Contains('wasdk')) +{ + if ($WinUIMajorVersion -eq 2) + { + $ExcludeMultiTargets = $ExcludeMultiTargets + 'wasdk' + } + else + { + $ExcludeMultiTargets = $ExcludeMultiTargets + 'uwp' + } +} + $MultiTargets = $MultiTargets | Where-Object { $_ -notin $ExcludeMultiTargets } # Generate required props for "All" solution. From 0c30f12ee586d9a5f3fa097176e2a65d8f3ea5cf Mon Sep 17 00:00:00 2001 From: Arlo Date: Wed, 4 Dec 2024 12:02:08 -0600 Subject: [PATCH 8/8] Update Uno Xaml Behaviors package references to version 3.0.0-dev.17.g7c09b9114d --- ProjectHeads/App.Head.Uno.UI.Dependencies.props | 2 +- ProjectHeads/App.Head.Uno.WinUI.Dependencies.props | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ProjectHeads/App.Head.Uno.UI.Dependencies.props b/ProjectHeads/App.Head.Uno.UI.Dependencies.props index 5619bec9..d3c8a7ff 100644 --- a/ProjectHeads/App.Head.Uno.UI.Dependencies.props +++ b/ProjectHeads/App.Head.Uno.UI.Dependencies.props @@ -3,7 +3,7 @@ - + diff --git a/ProjectHeads/App.Head.Uno.WinUI.Dependencies.props b/ProjectHeads/App.Head.Uno.WinUI.Dependencies.props index 0d911d78..ed26f4fd 100644 --- a/ProjectHeads/App.Head.Uno.WinUI.Dependencies.props +++ b/ProjectHeads/App.Head.Uno.WinUI.Dependencies.props @@ -3,6 +3,6 @@ - +