I'm trying to make my app (for Windows 10) working under .NET native.
I got stuck with the following issue: Enum.GetValues
fails at runtime with metadata is missing. I managed to simplify test case for this problem (in real life my code looks different). In portable library I have:
public enum enumValues
{
A1,
B1,
C1,
}
public class fff
{
public static object GetClass2Value()
{
return enumValues.B1;
}
}
In my Universal Windows app I call the following code:
Array aaa = Enum.GetValues(fff.GetClass2Value().GetType());
I receive the following exception:
Additional information: 'enumlibportable.enumValues[]' is missing metadata.
The problem is that I have no idea what to add to Default.rd.xml. I've tried to add different rd strings (enum subtype, enumValues class, enumValues[] etc.) using microsoft tool http://go.microsoft.com/fwlink/?LinkID=392859, but had no luck.
UPDATE:
I know that the following code will work for my testcase Enum.GetValues(typeof(enumValue))
, but I can't use it in my real project since I don't know the exact enum type in my real project.
It doesn't make sense to me, but the following RD string worked for my testcase:
<Type Name="enumlibportable.enumValues[]" Browse="Required All"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With