Skip to content

Commit 225d726

Browse files
committed
Disable projection generation for CsWinRT
1 parent bcde565 commit 225d726

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/CommunityToolkit.Mvvm/CommunityToolkit.Mvvm.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0-windows10.0.17763.0'))">
1212
<WindowsSdkPackageVersion>10.0.17763.37-preview</WindowsSdkPackageVersion>
1313

14+
<!--
15+
We're only referencing CsWinRT for the source generators, we don't need to read any WinRT metadata.
16+
CsWinRT is in projection mode by default, so we want to disable it (or it'd need the Windows SDK).
17+
-->
18+
<CsWinRTGenerateProjection>false</CsWinRTGenerateProjection>
19+
1420
<!-- Enable AOT warnings for types implementing projected WinRT interfaces mapped to built-in types (eg. 'INotifyPropertyChanged') -->
1521
<CsWinRTAotWarningLevel>2</CsWinRTAotWarningLevel>
1622
</PropertyGroup>

0 commit comments

Comments
 (0)