From 84a1d32476e399488508e0a733f2205b17178e75 Mon Sep 17 00:00:00 2001 From: Martin Zikmund Date: Tue, 17 Feb 2026 09:19:57 +0100 Subject: [PATCH 1/6] Update to Uno 6.x, drop Uno.UI --- Build-Toolkit-Components.ps1 | 14 ++++----- Build-Toolkit-Gallery.ps1 | 29 +++++++++---------- GenerateAllSolution.ps1 | 25 +++++++--------- GenerateSingleSolution.ps1 | 23 +++++++-------- MultiTarget/AvailableTargetFrameworks.props | 16 ++++------ MultiTarget/Defaults.props | 2 +- MultiTarget/DefinedConstants.props | 4 +-- MultiTarget/EnabledTargetFrameworks.props | 6 ++-- MultiTarget/Filter-Supported-Components.ps1 | 4 +-- MultiTarget/GenerateAllProjectReferences.ps1 | 4 +-- ...eMultiTargetAwareProjectReferenceProps.ps1 | 8 ++--- ...TargetAwareProjectReference.props.template | 2 -- ...getAwareSharedProjectImport.props.template | 2 -- MultiTarget/MultiTargetIdentifiers.props | 12 +------- MultiTarget/PackageReferences/Uno.props | 22 +++----------- MultiTarget/Test-Component-Support.ps1 | 12 ++++---- MultiTarget/UseTargetFrameworks.ps1 | 6 ++-- MultiTarget/UseUnoWinUI.ps1 | 2 -- .../App.Head.Uno.UI.Dependencies.props | 10 ------- .../App.Head.Uno.WinUI.Dependencies.props | 2 +- ProjectHeads/App.Head.Uno.props | 6 +--- ProjectHeads/App.Head.Wasm.props | 4 +-- ProjectHeads/GenerateSingleSampleHeads.ps1 | 2 +- ProjectTemplate/src/MultiTarget.props | 2 +- 24 files changed, 79 insertions(+), 140 deletions(-) delete mode 100644 ProjectHeads/App.Head.Uno.UI.Dependencies.props diff --git a/Build-Toolkit-Components.ps1 b/Build-Toolkit-Components.ps1 index 6cbc0ec5..94e30757 100644 --- a/Build-Toolkit-Components.ps1 +++ b/Build-Toolkit-Components.ps1 @@ -57,11 +57,11 @@ Date: 2/19/2024 #> Param ( - [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')] + [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard')] [Alias("mt")] [string[]]$MultiTargets = @('uwp', 'wasm', 'wasdk'), # default settings - - [ValidateSet('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')] + + [ValidateSet('wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard')] [string[]]$ExcludeMultiTargets = @(), # default settings [Alias("c")] @@ -97,7 +97,7 @@ Param ( if ($MultiTargets -eq 'all') { - $MultiTargets = @('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard') + $MultiTargets = @('wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard') } if ($null -eq $ExcludeMultiTargets) @@ -105,11 +105,11 @@ 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. +# WinUI 2 only builds native UWP (Uno.UI dropped in Uno 6). +# WinUI 3 excludes UWP. Both uwp and wasdk share a targetframework and cannot be enabled at once. if ($WinUIMajorVersion -eq 2) { - $ExcludeMultiTargets = $ExcludeMultiTargets + 'wasdk' + $ExcludeMultiTargets = $ExcludeMultiTargets + 'wasdk' + 'wasm' + 'macos' + 'ios' + 'android' } if ($WinUIMajorVersion -eq 3) diff --git a/Build-Toolkit-Gallery.ps1 b/Build-Toolkit-Gallery.ps1 index 7d92154e..06d85adc 100644 --- a/Build-Toolkit-Gallery.ps1 +++ b/Build-Toolkit-Gallery.ps1 @@ -9,7 +9,7 @@ Specifies the MultiTarget TFM(s) to include for building the components. The default value is 'all'. .PARAMETER ExcludeMultiTargets - Specifies the MultiTarget TFM(s) to exclude for building the components. The default value excludes targets that require additional tooling or workloads to build: 'wpf', 'linuxgtk', 'macos', 'ios', and 'android'. Run uno-check to install the required workloads. + Specifies the MultiTarget TFM(s) to exclude for building the components. The default value excludes targets that require additional tooling or workloads to build. Run uno-check to install the required workloads. .PARAMETER Heads The heads to include in the build. Default is 'Uwp', 'Wasdk', 'Wasm'. @@ -46,11 +46,11 @@ Date: 2/19/2024 #> Param ( - [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')] + [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard')] [Alias("mt")] [string[]]$MultiTargets = @('uwp', 'wasdk', 'wasm'), # default settings - - [ValidateSet('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')] + + [ValidateSet('wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard')] [string[]]$ExcludeMultiTargets = @(), # default settings [ValidateSet('all', 'Uwp', 'Wasdk', 'Wasm', 'Tests.Uwp', 'Tests.Wasdk')] @@ -87,22 +87,19 @@ 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')) +# WinUI 2 only builds native UWP (Uno.UI dropped in Uno 6). +# WinUI 3 excludes UWP. Both uwp and wasdk share a targetframework and cannot be enabled at once. +if ($WinUIMajorVersion -eq 2) { - if ($WinUIMajorVersion -eq 2) - { - $ExcludeMultiTargets = $ExcludeMultiTargets + 'wasdk' - } - else - { - $ExcludeMultiTargets = $ExcludeMultiTargets + 'uwp' - } + $ExcludeMultiTargets = $ExcludeMultiTargets + 'wasdk' + 'wasm' + 'macos' + 'ios' + 'android' +} +else +{ + $ExcludeMultiTargets = $ExcludeMultiTargets + 'uwp' } if ($MultiTargets -eq 'all') { - $MultiTargets = @('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard') + $MultiTargets = @('wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard') } if ($ExcludeMultiTargets) { diff --git a/GenerateAllSolution.ps1 b/GenerateAllSolution.ps1 index 72eb9bac..47ad59a4 100644 --- a/GenerateAllSolution.ps1 +++ b/GenerateAllSolution.ps1 @@ -38,11 +38,11 @@ Date: April 27, 2022 #> Param ( - [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')] + [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard')] [Alias("mt")] [string[]]$MultiTargets = @('uwp', 'wasm', 'wasdk'), - [ValidateSet('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')] + [ValidateSet('wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard')] [string[]]$ExcludeMultiTargets = @(), # default settings [Alias("c")] @@ -59,7 +59,7 @@ Param ( ) if ($MultiTargets.Contains('all')) { - $MultiTargets = @('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard') + $MultiTargets = @('wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard') } if ($null -eq $ExcludeMultiTargets) @@ -67,18 +67,15 @@ 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')) +# WinUI 2 only builds native UWP (Uno.UI dropped in Uno 6). +# WinUI 3 excludes UWP. Both uwp and wasdk share a targetframework and cannot be enabled at once. +if ($WinUIMajorVersion -eq 2) { - if ($WinUIMajorVersion -eq 2) - { - $ExcludeMultiTargets = $ExcludeMultiTargets + 'wasdk' - } - else - { - $ExcludeMultiTargets = $ExcludeMultiTargets + 'uwp' - } + $ExcludeMultiTargets = $ExcludeMultiTargets + 'wasdk' + 'wasm' + 'macos' + 'ios' + 'android' +} +else +{ + $ExcludeMultiTargets = $ExcludeMultiTargets + 'uwp' } $MultiTargets = $MultiTargets | Where-Object { $_ -notin $ExcludeMultiTargets } diff --git a/GenerateSingleSolution.ps1 b/GenerateSingleSolution.ps1 index 9f6c5736..b4cb30c6 100644 --- a/GenerateSingleSolution.ps1 +++ b/GenerateSingleSolution.ps1 @@ -33,7 +33,7 @@ Date: Feb 9, 2023 #> Param ( - [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android')] + [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android')] [Alias("mt")] [string[]]$MultiTargets = @('uwp', 'wasm', 'wasdk'), @@ -98,7 +98,7 @@ if (-not (Test-Path "$componentPath/src" -PathType Container)) # ----------------- if ($MultiTargets.Contains('all')) { - $MultiTargets = @('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android') + $MultiTargets = @('wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android') } if ($null -eq $ExcludeMultiTargets) @@ -106,18 +106,15 @@ 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')) +# WinUI 2 only builds native UWP (Uno.UI dropped in Uno 6). +# WinUI 3 excludes UWP. Both uwp and wasdk share a targetframework and cannot be enabled at once. +if ($WinUIMajorVersion -eq 2) { - if ($WinUIMajorVersion -eq 2) - { - $ExcludeMultiTargets = $ExcludeMultiTargets + 'wasdk' - } - else - { - $ExcludeMultiTargets = $ExcludeMultiTargets + 'uwp' - } + $ExcludeMultiTargets = $ExcludeMultiTargets + 'wasdk' + 'wasm' + 'macos' + 'ios' + 'android' +} +else +{ + $ExcludeMultiTargets = $ExcludeMultiTargets + 'uwp' } $MultiTargets = $MultiTargets | Where-Object { $_ -notin $ExcludeMultiTargets } diff --git a/MultiTarget/AvailableTargetFrameworks.props b/MultiTarget/AvailableTargetFrameworks.props index 02f9d9aa..4c402610 100644 --- a/MultiTarget/AvailableTargetFrameworks.props +++ b/MultiTarget/AvailableTargetFrameworks.props @@ -12,21 +12,17 @@ uap10.0.17763;net8.0-windows10.0.26100.0;net9.0-windows10.0.26100.0; net9.0-windows10.0.19041.0;net8.0-windows10.0.19041.0; - net9.0; - net9.0; - net9.0; + net9.0;net10.0; - net9.0-android; - net9.0-maccatalyst; - net9.0-ios; + net9.0-android;net10.0-android; + net9.0-maccatalyst;net10.0-maccatalyst; + net9.0-ios;net10.0-ios; - net9.0; - net9.0; - net9.0; + net9.0;net10.0; netstandard2.0; - net9.0; + net9.0;net10.0; \ No newline at end of file diff --git a/MultiTarget/Defaults.props b/MultiTarget/Defaults.props index 86e5e82f..20665cb2 100644 --- a/MultiTarget/Defaults.props +++ b/MultiTarget/Defaults.props @@ -1,5 +1,5 @@ - uwp;wasdk;wpf;wasm;linuxgtk;macos;ios;android; + uwp;wasdk;wasm;macos;ios;android; \ No newline at end of file diff --git a/MultiTarget/DefinedConstants.props b/MultiTarget/DefinedConstants.props index b5c8c2c9..2a2b6968 100644 --- a/MultiTarget/DefinedConstants.props +++ b/MultiTarget/DefinedConstants.props @@ -12,9 +12,7 @@ $(DefineConstants);__ANDROID__; $(DefineConstants);__IOS__; $(DefineConstants);__MACOS__; - $(DefineConstants);HAS_UNO_SKIA;__SKIA__;WINDOWS_WPF; - $(DefineConstants);HAS_UNO_SKIA;__SKIA__;__GTK__; - + $(DefineConstants);NET10_0_OR_GREATER $(DefineConstants);NET9_0_OR_GREATER $(DefineConstants);NET8_0_OR_GREATER $(DefineConstants);NET7_0_OR_GREATER diff --git a/MultiTarget/EnabledTargetFrameworks.props b/MultiTarget/EnabledTargetFrameworks.props index 6f1c0ab9..ca4bb1ec 100644 --- a/MultiTarget/EnabledTargetFrameworks.props +++ b/MultiTarget/EnabledTargetFrameworks.props @@ -10,11 +10,11 @@ $(TargetFrameworks);$(WinAppSdkTargetFrameworks) - true - true + true + true $(TargetFrameworks);$(DotnetCommonTargetFramework) $(TargetFrameworks);$(MacOSLibTargetFrameworks) diff --git a/MultiTarget/Filter-Supported-Components.ps1 b/MultiTarget/Filter-Supported-Components.ps1 index bc187e85..db01e964 100644 --- a/MultiTarget/Filter-Supported-Components.ps1 +++ b/MultiTarget/Filter-Supported-Components.ps1 @@ -17,7 +17,7 @@ Date: 6/6/2025 #> Param ( - [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')] + [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard')] [Alias("mt")] [Parameter(Mandatory=$true)] [string[]]$MultiTargets, @@ -32,7 +32,7 @@ Param ( ) if ($MultiTargets -eq 'all') { - $MultiTargets = @('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard') + $MultiTargets = @('wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard') } $supportedComponents = @(); diff --git a/MultiTarget/GenerateAllProjectReferences.ps1 b/MultiTarget/GenerateAllProjectReferences.ps1 index 62ca3b02..43d4f262 100644 --- a/MultiTarget/GenerateAllProjectReferences.ps1 +++ b/MultiTarget/GenerateAllProjectReferences.ps1 @@ -4,8 +4,8 @@ Param ( [Parameter(HelpMessage = "Only projects that support these targets will have references generated for use by deployable heads.")] [Alias("mt")] - [ValidateSet('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')] - [string[]]$MultiTargets = @("uwp", "wasdk", "wpf", "wasm", "linuxgtk", "macos", "ios", "android", "netstandard"), + [ValidateSet('wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard')] + [string[]]$MultiTargets = @("uwp", "wasdk", "wasm", "macos", "ios", "android", "netstandard"), [Parameter(HelpMessage = "The names of the components to generate references for. Defaults to all components.")] [string[]]$Components = @("all"), diff --git a/MultiTarget/GenerateMultiTargetAwareProjectReferenceProps.ps1 b/MultiTarget/GenerateMultiTargetAwareProjectReferenceProps.ps1 index dbbd6728..a7b2849f 100644 --- a/MultiTarget/GenerateMultiTargetAwareProjectReferenceProps.ps1 +++ b/MultiTarget/GenerateMultiTargetAwareProjectReferenceProps.ps1 @@ -15,9 +15,9 @@ Param ( [string]$projectRootPlaceholder = "[ProjectRoot]", [Parameter(HelpMessage = "Only projects that support these targets will have references generated for use by deployable heads.")] - [ValidateSet("uwp", "wasdk", "wpf", "wasm", "linuxgtk", "macos", "ios", "android", "netstandard")] + [ValidateSet("uwp", "wasdk", "wasm", "macos", "ios", "android", "netstandard")] [Alias("mt")] - [string[]] $MultiTargets = @("uwp", "wasdk", "wpf", "wasm", "linuxgtk", "macos", "ios", "android", "netstandard") + [string[]] $MultiTargets = @("uwp", "wasdk", "wasm", "macos", "ios", "android", "netstandard") ) if ($projectPath.EndsWith(".projitems")) { @@ -74,7 +74,7 @@ function ShouldMultiTargetMsBuildValue([string] $target) { return $(ShouldMultiTarget $target).ToString().ToLower() } -$targeted = @("uwp", "wasdk", "wpf", "wasm", "linuxgtk", "macos", "ios", "android", "netstandard").Where({ ShouldMultiTarget $_ }) +$targeted = @("uwp", "wasdk", "wasm", "macos", "ios", "android", "netstandard").Where({ ShouldMultiTarget $_ }) if ($targeted.Count -gt 0) { Write-Host "Generating project references for $([System.IO.Path]::GetFileNameWithoutExtension($projectFileName)): $($targeted -Join ', ')" @@ -83,8 +83,6 @@ if ($targeted.Count -gt 0) { $templateContents = $templateContents -replace [regex]::escape("[CanTargetWasm]"), "'$(ShouldMultiTargetMsBuildValue "wasm")'"; $templateContents = $templateContents -replace [regex]::escape("[CanTargetUwp]"), "'$(ShouldMultiTargetMsBuildValue "uwp")'"; $templateContents = $templateContents -replace [regex]::escape("[CanTargetWasdk]"), "'$(ShouldMultiTargetMsBuildValue "wasdk")'"; -$templateContents = $templateContents -replace [regex]::escape("[CanTargetWpf]"), "'$(ShouldMultiTargetMsBuildValue "wpf")'"; -$templateContents = $templateContents -replace [regex]::escape("[CanTargetLinuxGtk]"), "'$(ShouldMultiTargetMsBuildValue "linuxgtk")'"; $templateContents = $templateContents -replace [regex]::escape("[CanTargetMacOS]"), "'$(ShouldMultiTargetMsBuildValue "macos")'"; $templateContents = $templateContents -replace [regex]::escape("[CanTargetiOS]"), "'$(ShouldMultiTargetMsBuildValue "ios")'"; $templateContents = $templateContents -replace [regex]::escape("[CanTargetDroid]"), "'$(ShouldMultiTargetMsBuildValue "android")'"; diff --git a/MultiTarget/MultiTargetAwareProjectReference.props.template b/MultiTarget/MultiTargetAwareProjectReference.props.template index 86b3c4d8..5d3bb133 100644 --- a/MultiTarget/MultiTargetAwareProjectReference.props.template +++ b/MultiTarget/MultiTargetAwareProjectReference.props.template @@ -10,8 +10,6 @@ true - true - true true true true @@ -29,14 +27,6 @@ true true - true - true - true - - true - true - true - true true @@ -47,7 +37,7 @@ true true - true + true - + true - - + + - - - - - - - - - - - $(NoWarn);NU1701; - - - - - - - - - - - diff --git a/ProjectHeads/App.Head.Uno.WinUI.Dependencies.props b/ProjectHeads/App.Head.Uno.WinUI.Dependencies.props index d18fbfb5..608b7cec 100644 --- a/ProjectHeads/App.Head.Uno.WinUI.Dependencies.props +++ b/ProjectHeads/App.Head.Uno.WinUI.Dependencies.props @@ -4,6 +4,6 @@ - + diff --git a/ProjectHeads/App.Head.Uno.props b/ProjectHeads/App.Head.Uno.props index 865ea717..618faaa3 100644 --- a/ProjectHeads/App.Head.Uno.props +++ b/ProjectHeads/App.Head.Uno.props @@ -23,10 +23,6 @@ $(NoWarn);Uno0006 - + diff --git a/ProjectHeads/App.Head.Wasm.props b/ProjectHeads/App.Head.Wasm.props index 9861b527..d2dc6e53 100644 --- a/ProjectHeads/App.Head.Wasm.props +++ b/ProjectHeads/App.Head.Wasm.props @@ -68,8 +68,8 @@ - - + + diff --git a/ProjectHeads/GenerateSingleSampleHeads.ps1 b/ProjectHeads/GenerateSingleSampleHeads.ps1 index 0bbee407..15adecd8 100644 --- a/ProjectHeads/GenerateSingleSampleHeads.ps1 +++ b/ProjectHeads/GenerateSingleSampleHeads.ps1 @@ -30,7 +30,7 @@ Date: Feb 9, 2023 #> Param ( - [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android')] + [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android')] [Alias("mt")] [string[]]$MultiTargets = @('uwp', 'wasm', 'wasdk'), diff --git a/ProjectTemplate/src/MultiTarget.props b/ProjectTemplate/src/MultiTarget.props index b11c1942..caab2d42 100644 --- a/ProjectTemplate/src/MultiTarget.props +++ b/ProjectTemplate/src/MultiTarget.props @@ -4,6 +4,6 @@ MultiTarget is a custom property that indicates which target a project is designed to be built for / run on. Used to create project references, generate solution files, enable/disable TargetFrameworks, and build nuget packages. --> - uwp;wasdk;wpf;wasm;linuxgtk;macos;ios;android; + uwp;wasdk;wasm;macos;ios;android; \ No newline at end of file From b01ef4f2aee74a91a3e59e4968753fdfa486b071 Mon Sep 17 00:00:00 2001 From: Martin Zikmund Date: Tue, 17 Feb 2026 10:51:43 +0100 Subject: [PATCH 2/6] Update to .NET 10 compatible Uno.WinUI version --- .github/workflows/build.yml | 3 +++ MultiTarget/PackageReferences/Uno.props | 4 ++-- ProjectHeads/App.Head.Uno.WinUI.Dependencies.props | 2 +- ProjectHeads/App.Head.Wasm.props | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0427f67c..9ae773c8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -145,6 +145,9 @@ jobs: # WinUI 2 not supported on wasdk - winui: 2 multitarget: wasdk + # WinUI 2 not supported on wasm (Uno 6.x dropped Uno.UI) + - winui: 2 + multitarget: wasm # WinUI 3 not supported on uwp - winui: 3 multitarget: uwp diff --git a/MultiTarget/PackageReferences/Uno.props b/MultiTarget/PackageReferences/Uno.props index 1050481e..198483d9 100644 --- a/MultiTarget/PackageReferences/Uno.props +++ b/MultiTarget/PackageReferences/Uno.props @@ -1,12 +1,12 @@ - 6.0.465 + 6.4.229 - + diff --git a/ProjectHeads/App.Head.Uno.WinUI.Dependencies.props b/ProjectHeads/App.Head.Uno.WinUI.Dependencies.props index 608b7cec..77c9bc88 100644 --- a/ProjectHeads/App.Head.Uno.WinUI.Dependencies.props +++ b/ProjectHeads/App.Head.Uno.WinUI.Dependencies.props @@ -4,6 +4,6 @@ - + diff --git a/ProjectHeads/App.Head.Wasm.props b/ProjectHeads/App.Head.Wasm.props index d2dc6e53..20356243 100644 --- a/ProjectHeads/App.Head.Wasm.props +++ b/ProjectHeads/App.Head.Wasm.props @@ -68,7 +68,7 @@ - + From 139b8aa97ae715ddbbd699aeee02f6eb562cdef1 Mon Sep 17 00:00:00 2001 From: Martin Zikmund Date: Tue, 17 Feb 2026 14:31:17 +0100 Subject: [PATCH 3/6] chore: Keep .NET 9 targets --- MultiTarget/AvailableTargetFrameworks.props | 12 ++++++------ MultiTarget/DefinedConstants.props | 1 - ProjectHeads/App.Head.Wasm.props | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/MultiTarget/AvailableTargetFrameworks.props b/MultiTarget/AvailableTargetFrameworks.props index 4c402610..7ea4cd34 100644 --- a/MultiTarget/AvailableTargetFrameworks.props +++ b/MultiTarget/AvailableTargetFrameworks.props @@ -12,17 +12,17 @@ uap10.0.17763;net8.0-windows10.0.26100.0;net9.0-windows10.0.26100.0; net9.0-windows10.0.19041.0;net8.0-windows10.0.19041.0; - net9.0;net10.0; + net9.0; - net9.0-android;net10.0-android; - net9.0-maccatalyst;net10.0-maccatalyst; - net9.0-ios;net10.0-ios; + net9.0-android; + net9.0-maccatalyst; + net9.0-ios; - net9.0;net10.0; + net9.0; netstandard2.0; - net9.0;net10.0; + net9.0; \ No newline at end of file diff --git a/MultiTarget/DefinedConstants.props b/MultiTarget/DefinedConstants.props index 2a2b6968..37f46b79 100644 --- a/MultiTarget/DefinedConstants.props +++ b/MultiTarget/DefinedConstants.props @@ -12,7 +12,6 @@ $(DefineConstants);__ANDROID__; $(DefineConstants);__IOS__; $(DefineConstants);__MACOS__; - $(DefineConstants);NET10_0_OR_GREATER $(DefineConstants);NET9_0_OR_GREATER $(DefineConstants);NET8_0_OR_GREATER $(DefineConstants);NET7_0_OR_GREATER diff --git a/ProjectHeads/App.Head.Wasm.props b/ProjectHeads/App.Head.Wasm.props index 20356243..398f06b0 100644 --- a/ProjectHeads/App.Head.Wasm.props +++ b/ProjectHeads/App.Head.Wasm.props @@ -69,7 +69,7 @@ - + From 7beb76845a59719260110581f3939977648539e0 Mon Sep 17 00:00:00 2001 From: Martin Zikmund Date: Fri, 20 Feb 2026 09:42:27 +0100 Subject: [PATCH 4/6] Restore Uno 5.x for UWP targeting --- .github/workflows/build.yml | 3 -- Build-Toolkit-Components.ps1 | 12 ++--- Build-Toolkit-Gallery.ps1 | 27 ++++++----- GenerateAllSolution.ps1 | 25 +++++----- GenerateSingleSolution.ps1 | 23 +++++---- MultiTarget/AvailableTargetFrameworks.props | 6 ++- MultiTarget/Defaults.props | 2 +- MultiTarget/DefinedConstants.props | 3 ++ MultiTarget/EnabledTargetFrameworks.props | 6 +-- MultiTarget/Filter-Supported-Components.ps1 | 4 +- MultiTarget/GenerateAllProjectReferences.ps1 | 4 +- ...eMultiTargetAwareProjectReferenceProps.ps1 | 8 ++-- ...TargetAwareProjectReference.props.template | 2 + ...getAwareSharedProjectImport.props.template | 2 + MultiTarget/MultiTargetIdentifiers.props | 12 ++++- MultiTarget/PackageReferences/Uno.props | 48 +++++++++++++++++-- MultiTarget/Test-Component-Support.ps1 | 10 ++-- MultiTarget/UseTargetFrameworks.ps1 | 6 +-- .../App.Head.Uno.UI.Dependencies.props | 8 ++++ ProjectHeads/App.Head.Uno.props | 9 +++- ProjectHeads/App.Head.Wasm.props | 2 +- ProjectHeads/GenerateSingleSampleHeads.ps1 | 2 +- ProjectTemplate/src/MultiTarget.props | 2 +- 23 files changed, 154 insertions(+), 72 deletions(-) create mode 100644 ProjectHeads/App.Head.Uno.UI.Dependencies.props diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9ae773c8..0427f67c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -145,9 +145,6 @@ jobs: # WinUI 2 not supported on wasdk - winui: 2 multitarget: wasdk - # WinUI 2 not supported on wasm (Uno 6.x dropped Uno.UI) - - winui: 2 - multitarget: wasm # WinUI 3 not supported on uwp - winui: 3 multitarget: uwp diff --git a/Build-Toolkit-Components.ps1 b/Build-Toolkit-Components.ps1 index 94e30757..438be416 100644 --- a/Build-Toolkit-Components.ps1 +++ b/Build-Toolkit-Components.ps1 @@ -57,11 +57,11 @@ Date: 2/19/2024 #> Param ( - [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard')] + [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')] [Alias("mt")] [string[]]$MultiTargets = @('uwp', 'wasm', 'wasdk'), # default settings - [ValidateSet('wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard')] + [ValidateSet('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')] [string[]]$ExcludeMultiTargets = @(), # default settings [Alias("c")] @@ -97,7 +97,7 @@ Param ( if ($MultiTargets -eq 'all') { - $MultiTargets = @('wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard') + $MultiTargets = @('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard') } if ($null -eq $ExcludeMultiTargets) @@ -105,11 +105,11 @@ if ($null -eq $ExcludeMultiTargets) $ExcludeMultiTargets = @() } -# WinUI 2 only builds native UWP (Uno.UI dropped in Uno 6). -# WinUI 3 excludes UWP. Both uwp and wasdk share a targetframework and cannot be enabled at once. +# Both uwp and wasdk share a targetframework. Both cannot be enabled at once. +# If both are supplied, remove one based on WinUIMajorVersion. if ($WinUIMajorVersion -eq 2) { - $ExcludeMultiTargets = $ExcludeMultiTargets + 'wasdk' + 'wasm' + 'macos' + 'ios' + 'android' + $ExcludeMultiTargets = $ExcludeMultiTargets + 'wasdk' } if ($WinUIMajorVersion -eq 3) diff --git a/Build-Toolkit-Gallery.ps1 b/Build-Toolkit-Gallery.ps1 index 06d85adc..566ba237 100644 --- a/Build-Toolkit-Gallery.ps1 +++ b/Build-Toolkit-Gallery.ps1 @@ -9,7 +9,7 @@ Specifies the MultiTarget TFM(s) to include for building the components. The default value is 'all'. .PARAMETER ExcludeMultiTargets - Specifies the MultiTarget TFM(s) to exclude for building the components. The default value excludes targets that require additional tooling or workloads to build. Run uno-check to install the required workloads. + Specifies the MultiTarget TFM(s) to exclude for building the components. The default value excludes targets that require additional tooling or workloads to build: 'wpf', 'linuxgtk', 'macos', 'ios', and 'android'. Run uno-check to install the required workloads. .PARAMETER Heads The heads to include in the build. Default is 'Uwp', 'Wasdk', 'Wasm'. @@ -46,11 +46,11 @@ Date: 2/19/2024 #> Param ( - [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard')] + [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')] [Alias("mt")] [string[]]$MultiTargets = @('uwp', 'wasdk', 'wasm'), # default settings - [ValidateSet('wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard')] + [ValidateSet('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')] [string[]]$ExcludeMultiTargets = @(), # default settings [ValidateSet('all', 'Uwp', 'Wasdk', 'Wasm', 'Tests.Uwp', 'Tests.Wasdk')] @@ -87,19 +87,22 @@ if ($null -eq $ExcludeMultiTargets) $ExcludeMultiTargets = @() } -# WinUI 2 only builds native UWP (Uno.UI dropped in Uno 6). -# WinUI 3 excludes UWP. Both uwp and wasdk share a targetframework and cannot be enabled at once. -if ($WinUIMajorVersion -eq 2) +# 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')) { - $ExcludeMultiTargets = $ExcludeMultiTargets + 'wasdk' + 'wasm' + 'macos' + 'ios' + 'android' -} -else -{ - $ExcludeMultiTargets = $ExcludeMultiTargets + 'uwp' + if ($WinUIMajorVersion -eq 2) + { + $ExcludeMultiTargets = $ExcludeMultiTargets + 'wasdk' + } + else + { + $ExcludeMultiTargets = $ExcludeMultiTargets + 'uwp' + } } if ($MultiTargets -eq 'all') { - $MultiTargets = @('wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard') + $MultiTargets = @('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard') } if ($ExcludeMultiTargets) { diff --git a/GenerateAllSolution.ps1 b/GenerateAllSolution.ps1 index 47ad59a4..72eb9bac 100644 --- a/GenerateAllSolution.ps1 +++ b/GenerateAllSolution.ps1 @@ -38,11 +38,11 @@ Date: April 27, 2022 #> Param ( - [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard')] + [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')] [Alias("mt")] [string[]]$MultiTargets = @('uwp', 'wasm', 'wasdk'), - [ValidateSet('wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard')] + [ValidateSet('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')] [string[]]$ExcludeMultiTargets = @(), # default settings [Alias("c")] @@ -59,7 +59,7 @@ Param ( ) if ($MultiTargets.Contains('all')) { - $MultiTargets = @('wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard') + $MultiTargets = @('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard') } if ($null -eq $ExcludeMultiTargets) @@ -67,15 +67,18 @@ if ($null -eq $ExcludeMultiTargets) $ExcludeMultiTargets = @() } -# WinUI 2 only builds native UWP (Uno.UI dropped in Uno 6). -# WinUI 3 excludes UWP. Both uwp and wasdk share a targetframework and cannot be enabled at once. -if ($WinUIMajorVersion -eq 2) +# 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')) { - $ExcludeMultiTargets = $ExcludeMultiTargets + 'wasdk' + 'wasm' + 'macos' + 'ios' + 'android' -} -else -{ - $ExcludeMultiTargets = $ExcludeMultiTargets + 'uwp' + if ($WinUIMajorVersion -eq 2) + { + $ExcludeMultiTargets = $ExcludeMultiTargets + 'wasdk' + } + else + { + $ExcludeMultiTargets = $ExcludeMultiTargets + 'uwp' + } } $MultiTargets = $MultiTargets | Where-Object { $_ -notin $ExcludeMultiTargets } diff --git a/GenerateSingleSolution.ps1 b/GenerateSingleSolution.ps1 index b4cb30c6..9f6c5736 100644 --- a/GenerateSingleSolution.ps1 +++ b/GenerateSingleSolution.ps1 @@ -33,7 +33,7 @@ Date: Feb 9, 2023 #> Param ( - [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android')] + [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android')] [Alias("mt")] [string[]]$MultiTargets = @('uwp', 'wasm', 'wasdk'), @@ -98,7 +98,7 @@ if (-not (Test-Path "$componentPath/src" -PathType Container)) # ----------------- if ($MultiTargets.Contains('all')) { - $MultiTargets = @('wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android') + $MultiTargets = @('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android') } if ($null -eq $ExcludeMultiTargets) @@ -106,15 +106,18 @@ if ($null -eq $ExcludeMultiTargets) $ExcludeMultiTargets = @() } -# WinUI 2 only builds native UWP (Uno.UI dropped in Uno 6). -# WinUI 3 excludes UWP. Both uwp and wasdk share a targetframework and cannot be enabled at once. -if ($WinUIMajorVersion -eq 2) +# 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')) { - $ExcludeMultiTargets = $ExcludeMultiTargets + 'wasdk' + 'wasm' + 'macos' + 'ios' + 'android' -} -else -{ - $ExcludeMultiTargets = $ExcludeMultiTargets + 'uwp' + if ($WinUIMajorVersion -eq 2) + { + $ExcludeMultiTargets = $ExcludeMultiTargets + 'wasdk' + } + else + { + $ExcludeMultiTargets = $ExcludeMultiTargets + 'uwp' + } } $MultiTargets = $MultiTargets | Where-Object { $_ -notin $ExcludeMultiTargets } diff --git a/MultiTarget/AvailableTargetFrameworks.props b/MultiTarget/AvailableTargetFrameworks.props index 7ea4cd34..3ca0df19 100644 --- a/MultiTarget/AvailableTargetFrameworks.props +++ b/MultiTarget/AvailableTargetFrameworks.props @@ -13,13 +13,17 @@ net9.0-windows10.0.19041.0;net8.0-windows10.0.19041.0; net9.0; - + net9.0; + net9.0; + net9.0-android; net9.0-maccatalyst; net9.0-ios; + net9.0; net9.0; + net9.0; netstandard2.0; diff --git a/MultiTarget/Defaults.props b/MultiTarget/Defaults.props index 20665cb2..86e5e82f 100644 --- a/MultiTarget/Defaults.props +++ b/MultiTarget/Defaults.props @@ -1,5 +1,5 @@ - uwp;wasdk;wasm;macos;ios;android; + uwp;wasdk;wpf;wasm;linuxgtk;macos;ios;android; \ No newline at end of file diff --git a/MultiTarget/DefinedConstants.props b/MultiTarget/DefinedConstants.props index 37f46b79..b5c8c2c9 100644 --- a/MultiTarget/DefinedConstants.props +++ b/MultiTarget/DefinedConstants.props @@ -12,6 +12,9 @@ $(DefineConstants);__ANDROID__; $(DefineConstants);__IOS__; $(DefineConstants);__MACOS__; + $(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 diff --git a/MultiTarget/EnabledTargetFrameworks.props b/MultiTarget/EnabledTargetFrameworks.props index ca4bb1ec..6f1c0ab9 100644 --- a/MultiTarget/EnabledTargetFrameworks.props +++ b/MultiTarget/EnabledTargetFrameworks.props @@ -10,11 +10,11 @@ $(TargetFrameworks);$(WinAppSdkTargetFrameworks) - true - true + true + true $(TargetFrameworks);$(DotnetCommonTargetFramework) $(TargetFrameworks);$(MacOSLibTargetFrameworks) diff --git a/MultiTarget/Filter-Supported-Components.ps1 b/MultiTarget/Filter-Supported-Components.ps1 index db01e964..bc187e85 100644 --- a/MultiTarget/Filter-Supported-Components.ps1 +++ b/MultiTarget/Filter-Supported-Components.ps1 @@ -17,7 +17,7 @@ Date: 6/6/2025 #> Param ( - [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard')] + [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')] [Alias("mt")] [Parameter(Mandatory=$true)] [string[]]$MultiTargets, @@ -32,7 +32,7 @@ Param ( ) if ($MultiTargets -eq 'all') { - $MultiTargets = @('wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard') + $MultiTargets = @('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard') } $supportedComponents = @(); diff --git a/MultiTarget/GenerateAllProjectReferences.ps1 b/MultiTarget/GenerateAllProjectReferences.ps1 index 43d4f262..62ca3b02 100644 --- a/MultiTarget/GenerateAllProjectReferences.ps1 +++ b/MultiTarget/GenerateAllProjectReferences.ps1 @@ -4,8 +4,8 @@ Param ( [Parameter(HelpMessage = "Only projects that support these targets will have references generated for use by deployable heads.")] [Alias("mt")] - [ValidateSet('wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard')] - [string[]]$MultiTargets = @("uwp", "wasdk", "wasm", "macos", "ios", "android", "netstandard"), + [ValidateSet('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')] + [string[]]$MultiTargets = @("uwp", "wasdk", "wpf", "wasm", "linuxgtk", "macos", "ios", "android", "netstandard"), [Parameter(HelpMessage = "The names of the components to generate references for. Defaults to all components.")] [string[]]$Components = @("all"), diff --git a/MultiTarget/GenerateMultiTargetAwareProjectReferenceProps.ps1 b/MultiTarget/GenerateMultiTargetAwareProjectReferenceProps.ps1 index a7b2849f..dbbd6728 100644 --- a/MultiTarget/GenerateMultiTargetAwareProjectReferenceProps.ps1 +++ b/MultiTarget/GenerateMultiTargetAwareProjectReferenceProps.ps1 @@ -15,9 +15,9 @@ Param ( [string]$projectRootPlaceholder = "[ProjectRoot]", [Parameter(HelpMessage = "Only projects that support these targets will have references generated for use by deployable heads.")] - [ValidateSet("uwp", "wasdk", "wasm", "macos", "ios", "android", "netstandard")] + [ValidateSet("uwp", "wasdk", "wpf", "wasm", "linuxgtk", "macos", "ios", "android", "netstandard")] [Alias("mt")] - [string[]] $MultiTargets = @("uwp", "wasdk", "wasm", "macos", "ios", "android", "netstandard") + [string[]] $MultiTargets = @("uwp", "wasdk", "wpf", "wasm", "linuxgtk", "macos", "ios", "android", "netstandard") ) if ($projectPath.EndsWith(".projitems")) { @@ -74,7 +74,7 @@ function ShouldMultiTargetMsBuildValue([string] $target) { return $(ShouldMultiTarget $target).ToString().ToLower() } -$targeted = @("uwp", "wasdk", "wasm", "macos", "ios", "android", "netstandard").Where({ ShouldMultiTarget $_ }) +$targeted = @("uwp", "wasdk", "wpf", "wasm", "linuxgtk", "macos", "ios", "android", "netstandard").Where({ ShouldMultiTarget $_ }) if ($targeted.Count -gt 0) { Write-Host "Generating project references for $([System.IO.Path]::GetFileNameWithoutExtension($projectFileName)): $($targeted -Join ', ')" @@ -83,6 +83,8 @@ if ($targeted.Count -gt 0) { $templateContents = $templateContents -replace [regex]::escape("[CanTargetWasm]"), "'$(ShouldMultiTargetMsBuildValue "wasm")'"; $templateContents = $templateContents -replace [regex]::escape("[CanTargetUwp]"), "'$(ShouldMultiTargetMsBuildValue "uwp")'"; $templateContents = $templateContents -replace [regex]::escape("[CanTargetWasdk]"), "'$(ShouldMultiTargetMsBuildValue "wasdk")'"; +$templateContents = $templateContents -replace [regex]::escape("[CanTargetWpf]"), "'$(ShouldMultiTargetMsBuildValue "wpf")'"; +$templateContents = $templateContents -replace [regex]::escape("[CanTargetLinuxGtk]"), "'$(ShouldMultiTargetMsBuildValue "linuxgtk")'"; $templateContents = $templateContents -replace [regex]::escape("[CanTargetMacOS]"), "'$(ShouldMultiTargetMsBuildValue "macos")'"; $templateContents = $templateContents -replace [regex]::escape("[CanTargetiOS]"), "'$(ShouldMultiTargetMsBuildValue "ios")'"; $templateContents = $templateContents -replace [regex]::escape("[CanTargetDroid]"), "'$(ShouldMultiTargetMsBuildValue "android")'"; diff --git a/MultiTarget/MultiTargetAwareProjectReference.props.template b/MultiTarget/MultiTargetAwareProjectReference.props.template index 5d3bb133..86b3c4d8 100644 --- a/MultiTarget/MultiTargetAwareProjectReference.props.template +++ b/MultiTarget/MultiTargetAwareProjectReference.props.template @@ -10,6 +10,8 @@ true + true + true true true true @@ -27,6 +29,14 @@ true true + true + true + true + + true + true + true + true true @@ -37,7 +47,7 @@ true true - true + true + 5.5.87 + + 6.4.229 + + $(UnoUIPackageVersion) + $(UnoWinUIPackageVersion) - + + + + + + + + true - + + + + + + + + + + + + + + + + + + + + + $(NoWarn);NU1701; + + + + + + + diff --git a/MultiTarget/Test-Component-Support.ps1 b/MultiTarget/Test-Component-Support.ps1 index 7dd2da2c..e81e82a1 100644 --- a/MultiTarget/Test-Component-Support.ps1 +++ b/MultiTarget/Test-Component-Support.ps1 @@ -32,11 +32,11 @@ Date: 6/6/2025 #> Param ( - [ValidateSet('wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard')] + [ValidateSet('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')] [Alias("smt")] [string[]]$SupportedMultiTargets, - [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard')] + [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')] [Alias("rmt")] [Parameter(Mandatory=$true)] [string[]]$RequestedMultiTargets, @@ -51,14 +51,14 @@ Param ( ) if ($RequestedMultiTargets -eq 'all') { - $RequestedMultiTargets = @('wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard') + $RequestedMultiTargets = @('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard') } # List of WinUI-0 (non-WinUI) compatible multitargets $WinUI0MultiTargets = @('netstandard') -# List of WinUI-2 compatible multitargets (native UWP only, Uno.UI dropped) -$WinUI2MultiTargets = @('uwp') +# List of WinUI-2 compatible multitargets +$WinUI2MultiTargets = @('uwp', 'wasm', 'wpf', 'linuxgtk', 'macos', 'ios', 'android') # List of WinUI-3 compatible multitargets $WinUI3MultiTargets = @('wasdk', 'wasm', 'macos', 'ios', 'android') diff --git a/MultiTarget/UseTargetFrameworks.ps1 b/MultiTarget/UseTargetFrameworks.ps1 index e6c9d006..1fa00ae4 100644 --- a/MultiTarget/UseTargetFrameworks.ps1 +++ b/MultiTarget/UseTargetFrameworks.ps1 @@ -22,19 +22,19 @@ #> Param ( [Parameter(HelpMessage = "The target frameworks to enable.")] - [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard')] + [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')] [Alias("mt")] [string[]]$MultiTargets = @('uwp', 'wasdk', 'wasm'), # default settings [Parameter(HelpMessage = "The target frameworks to disable.")] - [ValidateSet('wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard')] + [ValidateSet('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')] [string[]]$ExcludeMultiTargets = @() # default settings ) $fileContents = Get-Content -Path $PSScriptRoot/EnabledMultiTargets.props $newFileContents = $fileContents; -$AllMultiTargets = @('wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android', 'netstandard') +$AllMultiTargets = @('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard') # Exclude as needed foreach ($excluded in $ExcludeMultiTargets) { diff --git a/ProjectHeads/App.Head.Uno.UI.Dependencies.props b/ProjectHeads/App.Head.Uno.UI.Dependencies.props new file mode 100644 index 00000000..49fe326c --- /dev/null +++ b/ProjectHeads/App.Head.Uno.UI.Dependencies.props @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/ProjectHeads/App.Head.Uno.props b/ProjectHeads/App.Head.Uno.props index 618faaa3..7ff16c8f 100644 --- a/ProjectHeads/App.Head.Uno.props +++ b/ProjectHeads/App.Head.Uno.props @@ -23,6 +23,11 @@ $(NoWarn);Uno0006 - - + + + diff --git a/ProjectHeads/App.Head.Wasm.props b/ProjectHeads/App.Head.Wasm.props index 398f06b0..74aef1a4 100644 --- a/ProjectHeads/App.Head.Wasm.props +++ b/ProjectHeads/App.Head.Wasm.props @@ -68,7 +68,7 @@ - + diff --git a/ProjectHeads/GenerateSingleSampleHeads.ps1 b/ProjectHeads/GenerateSingleSampleHeads.ps1 index 15adecd8..0bbee407 100644 --- a/ProjectHeads/GenerateSingleSampleHeads.ps1 +++ b/ProjectHeads/GenerateSingleSampleHeads.ps1 @@ -30,7 +30,7 @@ Date: Feb 9, 2023 #> Param ( - [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'macos', 'ios', 'android')] + [ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android')] [Alias("mt")] [string[]]$MultiTargets = @('uwp', 'wasm', 'wasdk'), diff --git a/ProjectTemplate/src/MultiTarget.props b/ProjectTemplate/src/MultiTarget.props index caab2d42..b11c1942 100644 --- a/ProjectTemplate/src/MultiTarget.props +++ b/ProjectTemplate/src/MultiTarget.props @@ -4,6 +4,6 @@ MultiTarget is a custom property that indicates which target a project is designed to be built for / run on. Used to create project references, generate solution files, enable/disable TargetFrameworks, and build nuget packages. --> - uwp;wasdk;wasm;macos;ios;android; + uwp;wasdk;wpf;wasm;linuxgtk;macos;ios;android; \ No newline at end of file From 5dbe67146529a0a9d2a06c54560ee7483c7cb1f7 Mon Sep 17 00:00:00 2001 From: Martin Zikmund Date: Fri, 20 Feb 2026 09:48:40 +0100 Subject: [PATCH 5/6] Adjustments --- MultiTarget/PackageReferences/Uno.props | 20 +++++++++----------- MultiTarget/Test-Component-Support.ps1 | 2 +- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/MultiTarget/PackageReferences/Uno.props b/MultiTarget/PackageReferences/Uno.props index 4ea6b13f..37b157f6 100644 --- a/MultiTarget/PackageReferences/Uno.props +++ b/MultiTarget/PackageReferences/Uno.props @@ -10,16 +10,16 @@ - - - - + + + + @@ -36,15 +36,13 @@ - - - - + + + - - - + + diff --git a/MultiTarget/Test-Component-Support.ps1 b/MultiTarget/Test-Component-Support.ps1 index e81e82a1..3b5d068f 100644 --- a/MultiTarget/Test-Component-Support.ps1 +++ b/MultiTarget/Test-Component-Support.ps1 @@ -61,7 +61,7 @@ $WinUI0MultiTargets = @('netstandard') $WinUI2MultiTargets = @('uwp', 'wasm', 'wpf', 'linuxgtk', 'macos', 'ios', 'android') # List of WinUI-3 compatible multitargets -$WinUI3MultiTargets = @('wasdk', 'wasm', 'macos', 'ios', 'android') +$WinUI3MultiTargets = @('wasdk', 'wasm', 'ios', 'android') # If WinUI 0 is requested, the component must not support WinUI 2 or WinUI 3 to be built. # If WinUI 2 or 3 is requested, the component must have a target that supports WinUI 2 or 3 to be built. From 13b4ee25d6990c4115411434ee8b5a982fcfaf01 Mon Sep 17 00:00:00 2001 From: Martin Zikmund Date: Fri, 20 Feb 2026 09:52:46 +0100 Subject: [PATCH 6/6] Undo change --- MultiTarget/UseUnoWinUI.ps1 | 2 ++ ProjectHeads/App.Head.Uno.props | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/MultiTarget/UseUnoWinUI.ps1 b/MultiTarget/UseUnoWinUI.ps1 index 72a36baf..7b419a43 100644 --- a/MultiTarget/UseUnoWinUI.ps1 +++ b/MultiTarget/UseUnoWinUI.ps1 @@ -11,12 +11,14 @@ function ApplyWinUISwap([string] $filePath) { $fileContents = $fileContents -replace '2', '3'; $fileContents = $fileContents -replace 'Uwp', 'WinUI'; $fileContents = $fileContents -replace 'Uwp', 'WinUI'; + $fileContents = $fileContents -replace 'Uno.UI', 'Uno.WinUI'; } if ($winUIMajorVersion -eq "2") { $fileContents = $fileContents -replace '3', '2'; $fileContents = $fileContents -replace 'WinUI', 'Uwp'; $fileContents = $fileContents -replace 'WinUI', 'Uwp'; + $fileContents = $fileContents -replace 'Uno.WinUI', 'Uno.UI'; } Set-Content -Force -Path $filePath -Value $fileContents; diff --git a/ProjectHeads/App.Head.Uno.props b/ProjectHeads/App.Head.Uno.props index 7ff16c8f..900312c4 100644 --- a/ProjectHeads/App.Head.Uno.props +++ b/ProjectHeads/App.Head.Uno.props @@ -28,6 +28,5 @@ This import must be inside THIS file to allow swapping between Uno.UI and Uno.WinUI via pwsh. Changes to this file are suppressed by git when switching to avoid changing the default for all users. --> - - +