Skip to content

Commit b36a5a9

Browse files
committed
Fix 'UseUwp' condition
1 parent ce5ec75 commit b36a5a9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

MultiTarget/MultiTargetIdentifiers.props

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@
6464
<HasWinUI Condition="'$(HasWinUI)' == '' AND '$(WinUIMajorVersion)' == '2' AND '$(HasWinUI2)' == 'false'">false</HasWinUI>
6565
<HasWinUI Condition="'$(HasWinUI)' == '' AND ('$(IsUwp)' == 'true' OR '$(IsWinAppSdk)' == 'true' OR '$(IsUno)' == 'true')">true</HasWinUI>
6666

67-
<UseUwp Condition="'$(HasWinUI)' == 'true' AND '$(IsUwp)' == 'true' AND '$(MultiTargetPlatformIdentifier)' == 'windows'">true</UseUwp>
67+
<!--
68+
The 'UseUwp' property tells the .NET SDK to add a framework reference for the 'Microsoft.Windows.UI.Xaml.dll' assembly, which allows
69+
.NET projects to access UWP XAML types. This is orthogonal to whether WinUI is being used or not. As such, we always set this for
70+
UWP projects that have 'windows' as identifier (i.e. they are not 'UAP' projects, which is legacy UWP), regardless of WinUI.
71+
-->
72+
<UseUwp Condition="'$(IsUwp)' == 'true' AND '$(MultiTargetPlatformIdentifier)' == 'windows'">true</UseUwp>
6873
</PropertyGroup>
6974
</Project>

0 commit comments

Comments
 (0)