Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add 'ILLink.Substitutions.xml' file and embed it
  • Loading branch information
Sergio0694 committed Aug 9, 2024
commit 1e0a83b1b5f5dd3a53f0d9e3f90620581c8f2401
5 changes: 5 additions & 0 deletions src/CommunityToolkit.Mvvm/CommunityToolkit.Mvvm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
</ItemGroup>

<!-- Include the ILLink file (to properly trim configuration switches in publish builds) -->
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">
<EmbeddedResource Include="Properties\ILLink.Substitutions.xml" LogicalName="ILLink.Substitutions.xml" />
</ItemGroup>

<!-- Reference CsWinRT when targeting Windows, to get the latest source generators -->
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0-windows10.0.17763.0'))">
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.1.1" PrivateAssets="all" />
Expand Down
10 changes: 10 additions & 0 deletions src/CommunityToolkit.Mvvm/Properties/ILLink.Substitutions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<linker>
<assembly fullname="CommunityToolkit.Mvvm">
<type fullname="CommunityToolkit.Mvvm.FeatureSwitches">

<!-- MVVMTOOLKIT_ENABLE_INOTIFYPROPERTYCHANGING_SUPPORT switch -->
<method signature="System.Boolean get_EnableINotifyPropertyChangingSupport()" body="stub" value="false" feature="MVVMTOOLKIT_ENABLE_INOTIFYPROPERTYCHANGING_SUPPORT" featurevalue="false"/>
<method signature="System.Boolean get_EnableINotifyPropertyChangingSupport()" body="stub" value="true" feature="MVVMTOOLKIT_ENABLE_INOTIFYPROPERTYCHANGING_SUPPORT" featurevalue="true"/>
</type>
</assembly>
</linker>