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.