Skip to content

Commit b5de709

Browse files
committed
Fixed an issue where switching to WinUI 3 would break UWP
1 parent 90b2441 commit b5de709

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

MultiTarget/Library.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
<!-- Get the enabled MultiTarget features for this project / run -->
99
<Import Project="$(ToolingDirectory)\MultiTarget\EnabledMultiTargets.props" />
1010
<Import Project="$(ToolingDirectory)\MultiTarget\EnabledTargetFrameworks.props" />
11+
<Import Project="$(ToolingDirectory)\MultiTarget\WinUI.TargetVersion.props" />
1112

1213
<!-- Use <MultiTarget> values to define <TargetFrameworks> -->
1314
<Import Project="$(ToolingDirectory)\MultiTarget\MultiTargetToTargetFramework.props" />
1415

1516
<!-- Enable project identifiers -->
16-
<Import Project="$(ToolingDirectory)\MultiTarget\WinUI.TargetVersion.props" />
1717
<Import Project="$(ToolingDirectory)\MultiTarget\MultiTargetIdentifiers.props" />
1818
<Import Project="$(ToolingDirectory)\MultiTarget\DefinedConstants.props" />
1919

MultiTarget/MultiTargetIdentifiers.props

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,12 @@
5151
<IsUno Condition="'$(IsWasm)' == 'true' OR '$(IsWpf)' == 'true' OR '$(IsGtk)' == 'true' OR '$(IsDroid)' == 'true' OR '$(IsMacOS)' == 'true' OR '$(IsiOS)' == 'true'">true</IsUno>
5252

5353
<HasWinUI Condition="'$(IsUwp)' == 'true' OR '$(IsWinAppSdk)' == 'true' OR '$(IsUno)' == 'true'">true</HasWinUI>
54+
55+
<!--
56+
This property is only for changing the version used by Uno.
57+
Force the version to 2 for UWP and 3 for WinAppSDK.
58+
-->
59+
<WinUIMajorVersion Condition="'$(IsUwp)' == 'true'">2</WinUIMajorVersion>
60+
<WinUIMajorVersion Condition="'$(IsWinAppSdk)' == 'true'">3</WinUIMajorVersion>
5461
</PropertyGroup>
5562
</Project>

ProjectHeads/SingleComponent/Wasm/ProjectTemplate.Wasm.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<IsUno>true</IsUno>
66
<IsWasm>true</IsWasm>
77
<IsWasmHead>true</IsWasmHead>
8+
<HasWinUI>true</HasWinUI>
89

910
<IsSingleExperimentHead>true</IsSingleExperimentHead>
1011
</PropertyGroup>

0 commit comments

Comments
 (0)