Skip to content

Commit ba9b055

Browse files
authored
Update default WinUIMajorVersion to 3 in build scripts (#263)
* Update WinUIMajorVersion to 3 in build scripts * Update WinUIMajorVersion to 3 in GenerateSingleSampleHeads.ps1
1 parent 40e4936 commit ba9b055

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

Build-Toolkit-Components.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Param (
8585
[hashtable]$AdditionalProperties,
8686

8787
[Alias("winui")]
88-
[int]$WinUIMajorVersion = 2,
88+
[int]$WinUIMajorVersion = 3,
8989

9090
[string]$ComponentDir = "src",
9191

Build-Toolkit-Gallery.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Param (
6969
[hashtable]$AdditionalProperties,
7070

7171
[Alias("winui")]
72-
[int]$WinUIMajorVersion = 2,
72+
[int]$WinUIMajorVersion = 3,
7373

7474
[Alias("c")]
7575
[string[]]$Components = @("all"),

GenerateAllSolution.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Param (
4646
[string[]]$Components = @('all'),
4747

4848
[Alias("winui")]
49-
[int]$WinUIMajorVersion = 2,
49+
[int]$WinUIMajorVersion = 3,
5050

5151
[string[]]$ExcludeComponents,
5252

MultiTarget/PackageReferences/Uno.props

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<!-- This file is modified by UseUnoWinUI.ps1 to switch between WinUI 2 and 3 under Uno Platform -->
77
<!-- All Uno-based project heads and MultiTarget-enabled library projects need to reference this file, while native (UWP/WinAppSdk) heads don't. -->
88
<ItemGroup Condition="'$(IsUno)' == 'true'">
9-
<PackageReference Include="Uno.UI" Version="$(CommonUnoPackageVersion)" />
9+
<PackageReference Include="Uno.WinUI" Version="$(CommonUnoPackageVersion)" />
1010
<PackageReference Include="Uno.Fonts.Fluent" Version="2.4.5" />
1111
</ItemGroup>
1212

@@ -15,15 +15,15 @@
1515
</PropertyGroup>
1616

1717
<ItemGroup Condition="'$(IsWasm)' == 'true' OR '$(IsWpf)' == 'true' OR '$(IsGtk)' == 'true'">
18-
<PackageReference Include="Uno.UI.RemoteControl" Version="$(CommonUnoPackageVersion)" Condition="'$(Configuration)'=='Debug'" />
18+
<PackageReference Include="Uno.WinUI.RemoteControl" Version="$(CommonUnoPackageVersion)" Condition="'$(Configuration)'=='Debug'" />
1919
</ItemGroup>
2020

2121
<ItemGroup Condition="'$(IsGtkHead)' == 'true'">
22-
<PackageReference Include="Uno.UI.Skia.Gtk" Version="$(CommonUnoPackageVersion)" />
22+
<PackageReference Include="Uno.WinUI.Skia.Gtk" Version="$(CommonUnoPackageVersion)" />
2323
</ItemGroup>
2424

2525
<ItemGroup Condition="'$(IsWpfHead)' == 'true'">
26-
<PackageReference Include="Uno.UI.Skia.Wpf" Version="$(CommonUnoPackageVersion)" />
26+
<PackageReference Include="Uno.WinUI.Skia.Wpf" Version="$(CommonUnoPackageVersion)" />
2727
</ItemGroup>
2828

2929
<PropertyGroup Condition="'$(IsWpfHead)' == 'true'">
@@ -46,6 +46,6 @@
4646
</PropertyGroup>
4747

4848
<ItemGroup Condition="'$(IsWasmHead)' == 'true'">
49-
<PackageReference Include="Uno.UI.WebAssembly" Version="$(CommonUnoPackageVersion)" />
49+
<PackageReference Include="Uno.WinUI.WebAssembly" Version="$(CommonUnoPackageVersion)" />
5050
</ItemGroup>
5151
</Project>

MultiTarget/WinUI.TargetVersion.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project>
22
<PropertyGroup>
33
<!-- THIS AREA MODIFIED BY SCRIPTS -->
4-
<PackageIdVariant>Uwp</PackageIdVariant>
5-
<WinUIMajorVersion>2</WinUIMajorVersion>
4+
<PackageIdVariant>WinUI</PackageIdVariant>
5+
<WinUIMajorVersion>3</WinUIMajorVersion>
66
<!-- END SCRIPT AREA -->
77
</PropertyGroup>
88
</Project>

ProjectHeads/App.Head.Uno.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<DependencyVariant>Uwp</DependencyVariant>
3+
<DependencyVariant>WinUI</DependencyVariant>
44
</PropertyGroup>
55

66
<Import Project="$(MSBuildThisFileDirectory)\App.Head.props" />
@@ -9,7 +9,7 @@
99
<Import Project="$(MSBuildThisFileDirectory)\..\MultiTarget\NoWarn.props" />
1010

1111
<PropertyGroup Condition="'$(IsUno)' == 'true'">
12-
<!-- Code generated by Uno.UI.SourceGenerators creates AoT-unsafe code when Behaviors are used. -->
12+
<!-- Code generated by Uno.WinUI.SourceGenerators creates AoT-unsafe code when Behaviors are used. -->
1313
<NoWarn>$(NoWarn);IL2026</NoWarn>
1414

1515
<!--
@@ -28,5 +28,5 @@
2828
This import must be inside THIS file to allow swapping between Uno.​UI and Uno.​WinUI via pwsh.
2929
Changes to this file are suppressed by git when switching to avoid changing the default for all users.
3030
-->
31-
<Import Project="$(MSBuildThisFileDirectory)\App.Head.Uno.UI.Dependencies.props" />
31+
<Import Project="$(MSBuildThisFileDirectory)\App.Head.Uno.WinUI.Dependencies.props" />
3232
</Project>

ProjectHeads/GenerateSingleSampleHeads.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Param (
3737
[string[]]$ExcludeMultiTargets,
3838

3939
[Alias("winui")]
40-
[int]$WinUIMajorVersion = 2,
40+
[int]$WinUIMajorVersion = 3,
4141

4242
[Parameter(HelpMessage = "The path to the containing folder for a component where sample heads should be generated.")]
4343
[string]$componentPath,

0 commit comments

Comments
 (0)