Skip to content

Commit eb797b5

Browse files
committed
Add 'EnableXamlCompilerMismatchedTfmUnoWorkaround'
1 parent 93931e0 commit eb797b5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

MultiTarget/Extra.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<!-- Workaround, improved error message when consuming from Uno projects with mismatched TFMs -->
1616
<!-- See https://github.com/CommunityToolkit/Windows/issues/388 -->
17-
<ItemGroup>
17+
<ItemGroup Condition="'$(EnableXamlCompilerMismatchedTfmUnoWorkaround)' == 'true'">
1818
<None PackagePath="lib/net9.0-windows10.0.18362" Include="$(MSBuildThisFileDirectory)/_._" Pack="true" />
1919
<None PackagePath="lib/net8.0-windows10.0.18362" Include="$(MSBuildThisFileDirectory)/_._" Pack="true" />
2020
<None PackagePath="lib/net7.0-windows10.0.18362" Include="$(MSBuildThisFileDirectory)/_._" Pack="true" />

MultiTarget/MultiTargetIdentifiers.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@
4949

5050
<IsUno Condition="'$(IsWasm)' == 'true' OR '$(IsWpf)' == 'true' OR '$(IsGtk)' == 'true' OR '$(IsDroid)' == 'true' OR '$(IsMacOS)' == 'true' OR '$(IsiOS)' == 'true'">true</IsUno>
5151

52+
<!--
53+
Provide an opt-out switch for https://github.com/CommunityToolkit/Tooling-Windows-Submodule/issues/185.
54+
This causes problems for UWP packages just targeting 17763 or other lower TFMs, as it conflicts with this.
55+
-->
56+
<EnableXamlCompilerMismatchedTfmUnoWorkaround Condition="'$(EnableXamlCompilerMismatchedTfmUnoWorkaround)' == ''">true</EnableXamlCompilerMismatchedTfmUnoWorkaround>
5257

5358
<!--
5459
This property is only for changing the version used by Uno.

0 commit comments

Comments
 (0)