Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Build-Toolkit-Components.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Param (
[ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')]
[Alias("mt")]
[string[]]$MultiTargets = @('uwp', 'wasm', 'wasdk'), # default settings

[ValidateSet('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')]
[string[]]$ExcludeMultiTargets = @(), # default settings

Expand Down
2 changes: 1 addition & 1 deletion Build-Toolkit-Gallery.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Param (
[ValidateSet('all', 'wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')]
[Alias("mt")]
[string[]]$MultiTargets = @('uwp', 'wasdk', 'wasm'), # default settings

[ValidateSet('wasm', 'uwp', 'wasdk', 'wpf', 'linuxgtk', 'macos', 'ios', 'android', 'netstandard')]
[string[]]$ExcludeMultiTargets = @(), # default settings

Expand Down
2 changes: 1 addition & 1 deletion MultiTarget/AvailableTargetFrameworks.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<WasmHeadTargetFramework Condition="'$(WasmHeadTargetFramework)' == ''">net9.0;</WasmHeadTargetFramework>
<LinuxHeadTargetFramework Condition="'$(LinuxHeadTargetFramework)' == ''">net9.0;</LinuxHeadTargetFramework>
<WpfHeadTargetFramework Condition="'$(WpfHeadTargetFramework)' == ''">net9.0;</WpfHeadTargetFramework>

<AndroidLibTargetFrameworks Condition="'$(AndroidLibTargetFrameworks)' == ''">net9.0-android;</AndroidLibTargetFrameworks>
<MacOSLibTargetFrameworks Condition="'$(MacOSLibTargetFrameworks)' == ''">net9.0-maccatalyst;</MacOSLibTargetFrameworks>
<iOSLibTargetFrameworks Condition="'$(iOSLibTargetFrameworks)' == ''">net9.0-ios;</iOSLibTargetFrameworks>
Expand Down
46 changes: 35 additions & 11 deletions MultiTarget/PackageReferences/Uno.props
Original file line number Diff line number Diff line change
@@ -1,29 +1,48 @@
<Project>
<PropertyGroup>
<CommonUnoPackageVersion>5.5.87</CommonUnoPackageVersion>
<!-- Uno 5.x for WinUI 2 (Uno.UI / UWP variant) -->
<UnoUIPackageVersion>5.5.87</UnoUIPackageVersion>
<!-- Uno 6.x for WinUI 3 (Uno.WinUI variant) -->
<UnoWinUIPackageVersion>6.4.229</UnoWinUIPackageVersion>
<!-- Select active version based on WinUIMajorVersion -->
<CommonUnoPackageVersion Condition="'$(WinUIMajorVersion)' == '2'">$(UnoUIPackageVersion)</CommonUnoPackageVersion>
<CommonUnoPackageVersion Condition="'$(WinUIMajorVersion)' != '2'">$(UnoWinUIPackageVersion)</CommonUnoPackageVersion>
</PropertyGroup>

<!-- This file is modified by UseUnoWinUI.ps1 to switch between WinUI 2 and 3 under Uno Platform -->
<!-- All Uno-based project heads and MultiTarget-enabled library projects need to reference this file, while native (UWP/WinAppSdk) heads don't. -->
<ItemGroup Condition="'$(IsUno)' == 'true'">
<ItemGroup Condition="'$(IsUno)' == 'true' AND '$(WinUIMajorVersion)' != '2'">
<PackageReference Include="Uno.WinUI" Version="$(CommonUnoPackageVersion)" />
<PackageReference Include="Uno.Fonts.Fluent" Version="2.4.5" />
</ItemGroup>

<ItemGroup Condition="'$(IsUno)' == 'true' AND '$(WinUIMajorVersion)' == '2'">
<PackageReference Include="Uno.UI" Version="$(CommonUnoPackageVersion)" />
</ItemGroup>

<ItemGroup Condition="'$(IsUno)' == 'true'">
<PackageReference Include="Uno.Fonts.Fluent" Version="2.6.1" />
</ItemGroup>

<PropertyGroup Condition="'$(IsUno)' == 'true'">
<UnoUIUseRoslynSourceGenerators>true</UnoUIUseRoslynSourceGenerators>
</PropertyGroup>

<ItemGroup Condition="'$(IsWasm)' == 'true' OR '$(IsWpf)' == 'true' OR '$(IsGtk)' == 'true'">
<PackageReference Include="Uno.WinUI.RemoteControl" Version="$(CommonUnoPackageVersion)" Condition="'$(Configuration)'=='Debug'" />
<!-- WinUI 2: Uno.UI.RemoteControl for wasm/wpf/gtk -->
<ItemGroup Condition="'$(WinUIMajorVersion)' == '2' AND ('$(IsWasm)' == 'true' OR '$(IsWpf)' == 'true' OR '$(IsGtk)' == 'true')">
<PackageReference Include="Uno.UI.RemoteControl" Version="$(CommonUnoPackageVersion)" Condition="'$(Configuration)'=='Debug'" />
</ItemGroup>

<!-- WinUI 3: Uno.WinUI.DevServer for wasm -->
<ItemGroup Condition="'$(WinUIMajorVersion)' != '2' AND '$(IsWasm)' == 'true'">
<PackageReference Include="Uno.WinUI.DevServer" Version="$(CommonUnoPackageVersion)" Condition="'$(Configuration)'=='Debug'" />
</ItemGroup>

<ItemGroup Condition="'$(IsGtkHead)' == 'true'">
<PackageReference Include="Uno.WinUI.Skia.Gtk" Version="$(CommonUnoPackageVersion)" />
<!-- Skia desktop heads (WinUI 2 only — Uno 6 dropped WPF/GTK) -->
<ItemGroup Condition="'$(IsGtkHead)' == 'true' AND '$(WinUIMajorVersion)' == '2'">
<PackageReference Include="Uno.UI.Skia.Gtk" Version="$(CommonUnoPackageVersion)" />
</ItemGroup>

<ItemGroup Condition="'$(IsWpfHead)' == 'true'">
<PackageReference Include="Uno.WinUI.Skia.Wpf" Version="$(CommonUnoPackageVersion)" />
<ItemGroup Condition="'$(IsWpfHead)' == 'true' AND '$(WinUIMajorVersion)' == '2'">
<PackageReference Include="Uno.UI.Skia.Wpf" Version="$(CommonUnoPackageVersion)" />
</ItemGroup>

<PropertyGroup Condition="'$(IsWpfHead)' == 'true'">
Expand All @@ -45,7 +64,12 @@
<NoWarn>$(NoWarn);CS1570;</NoWarn>
</PropertyGroup>

<ItemGroup Condition="'$(IsWasmHead)' == 'true'">
<!-- Conditional WebAssembly packages -->
<ItemGroup Condition="'$(IsWasmHead)' == 'true' AND '$(WinUIMajorVersion)' == '2'">
<PackageReference Include="Uno.UI.WebAssembly" Version="$(CommonUnoPackageVersion)" />
</ItemGroup>

<ItemGroup Condition="'$(IsWasmHead)' == 'true' AND '$(WinUIMajorVersion)' != '2'">
<PackageReference Include="Uno.WinUI.WebAssembly" Version="$(CommonUnoPackageVersion)" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion MultiTarget/Test-Component-Support.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ $WinUI0MultiTargets = @('netstandard')
$WinUI2MultiTargets = @('uwp', 'wasm', 'wpf', 'linuxgtk', 'macos', 'ios', 'android')

# List of WinUI-3 compatible multitargets
$WinUI3MultiTargets = @('wasdk', 'wasm', 'wpf', 'linuxgtk', '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.
Expand Down
2 changes: 0 additions & 2 deletions ProjectHeads/App.Head.Uno.UI.Dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@
<PackageReference Include="Uno.Microsoft.Xaml.Behaviors.Interactivity" Version="3.0.3" />
</ItemGroup>
</Project>


2 changes: 1 addition & 1 deletion ProjectHeads/App.Head.Uno.WinUI.Dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<ItemGroup>
<!--<PackageReference Include="Uno.CommunityToolkit.WinUI.UI.Controls.Markdown" Version="7.1.100-dev.15.g12261e2626" />-->
<PackageReference Include="Uno.Microsoft.Xaml.Behaviors.Interactivity.WinUI" Version="3.0.3" />
<PackageReference Include="Uno.WinUI.Lottie" Version="5.5.87" />
<PackageReference Include="Uno.WinUI.Lottie" Version="6.4.229" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion ProjectHeads/App.Head.Uno.props
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<!--
Import Uno dependencies for all deployable Uno-based Labs project heads.
This import must be inside THIS file to allow swapping between Uno.UI and Uno.WinUI via pwsh.
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.
-->
<Import Project="$(MSBuildThisFileDirectory)\App.Head.Uno.WinUI.Dependencies.props" />
Expand Down
2 changes: 1 addition & 1 deletion ProjectHeads/App.Head.Wasm.props
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<PackageReference Include="Microsoft.Windows.Compatibility" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0" />
<PackageReference Include="Uno.Extensions.Logging.WebAssembly.Console" Version="1.9.0-dev.2" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="5.5.66" />
<PackageReference Include="Uno.UI.Adapter.Microsoft.Extensions.Logging" Version="$(CommonUnoPackageVersion)" />
<PackageReference Include="Uno.Wasm.Bootstrap" Version="9.0.10" />
<PackageReference Include="Microsoft.NET.ILLink.Tasks" Version="9.0.0" />
</ItemGroup>
Expand Down
Loading