Search code examples
c#.netuwpprism.net-native

UWP .NET Native Issue


I am using Prism 6 for UWP and Microsoft.NetCore.Uwp 5.2.2. I faced with issue in Release version that I cannot use reflection.

I have such objects as IDictionary<string, ReadOnlyCollection<string>>. How to add policy in default.rd.xml for them?


Solution

  • In my project, we recently had a similar issue with IDictionary, see here. I don't know if the error message is similar to yours, but the solution in our case was to add runtime directives in the .rd.xml file similar to this:

    <Type Name="System.Collections.Generic.IDictionary{System.String,System.Collections.ObjectModel.ReadOnlyCollection{System.String}}" MarshalStructure="Excluded" />