Skip to content

Commit 22c9250

Browse files
committed
Tried fixing but didn't work
1 parent 5553f45 commit 22c9250

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Microsoft.Toolkit.Uwp.Notifications/Microsoft.Toolkit.Uwp.Notifications.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@
3535
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="$(ExtrasUwpMetaPackageVersion)" PrivateAssets="all" IsImplicitlyDefined="true" />
3636
</ItemGroup>
3737

38+
<!-- In order to support .NET Native, we need to include an appropriate .rd.xml for UWP (remove from everything else) -->
39+
<ItemGroup Condition="'$(TargetFramework)' != 'uap10.0.19041'">
40+
<EmbeddedResource Remove="Properties\Microsoft.Toolkit.Uwp.Notifications.rd.xml" />
41+
</ItemGroup>
42+
3843
<ItemGroup>
3944
<None Include="Microsoft.Toolkit.Uwp.Notifications.targets" Pack="true" PackagePath="build\native" />
4045
</ItemGroup>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!--
2+
This file enable reflections for Toolkit.Notifications and all of its public/private members,
3+
enabling the library to work in .NET Native even if developers modified their default rd.xml.
4+
See issue https://github.com/windows-toolkit/WindowsCommunityToolkit/issues/3093 for more details.
5+
-->
6+
7+
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
8+
<Application>
9+
<Assembly Name="Microsoft.Toolkit.Uwp.Notifications" Dynamic="Required All" />
10+
</Application>
11+
</Directives>

0 commit comments

Comments
 (0)