Skip to content

Commit 1e0a83b

Browse files
committed
Add 'ILLink.Substitutions.xml' file and embed it
1 parent 4cad2e0 commit 1e0a83b

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/CommunityToolkit.Mvvm/CommunityToolkit.Mvvm.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@
5454
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
5555
</ItemGroup>
5656

57+
<!-- Include the ILLink file (to properly trim configuration switches in publish builds) -->
58+
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">
59+
<EmbeddedResource Include="Properties\ILLink.Substitutions.xml" LogicalName="ILLink.Substitutions.xml" />
60+
</ItemGroup>
61+
5762
<!-- Reference CsWinRT when targeting Windows, to get the latest source generators -->
5863
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0-windows10.0.17763.0'))">
5964
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.1.1" PrivateAssets="all" />
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<linker>
2+
<assembly fullname="CommunityToolkit.Mvvm">
3+
<type fullname="CommunityToolkit.Mvvm.FeatureSwitches">
4+
5+
<!-- MVVMTOOLKIT_ENABLE_INOTIFYPROPERTYCHANGING_SUPPORT switch -->
6+
<method signature="System.Boolean get_EnableINotifyPropertyChangingSupport()" body="stub" value="false" feature="MVVMTOOLKIT_ENABLE_INOTIFYPROPERTYCHANGING_SUPPORT" featurevalue="false"/>
7+
<method signature="System.Boolean get_EnableINotifyPropertyChangingSupport()" body="stub" value="true" feature="MVVMTOOLKIT_ENABLE_INOTIFYPROPERTYCHANGING_SUPPORT" featurevalue="true"/>
8+
</type>
9+
</assembly>
10+
</linker>

0 commit comments

Comments
 (0)