Resolve "System.Reflection.MissingMetadataException" when running UWP app in release mode
I had been seen an issue "System.Reflection.MissingMetadataException" when running a UWP app in release mode. It was failure at the code: public static MobileServiceClient MobileService = new MobileServiceClient("");
I turn on the "Compile with .NET Native tool chain" option in property of project settings as below screen shot, and then run the app in Debug mode.
In my case, the change as below:
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Application>
<Namespace Name="" Activate="Required Public" />
<Type Name="Microsoft.WindowsAzure.MobileServices" Dynamic="Required All" />
<Type Name="Microsoft.WindowsAzure.MobileServices.PlatformInformation" Dynamic="Required All" />
<Namespace Name="System.Private.Reflection.Core" Serialize="Required All" />
<Type Name="System.EventHandler" Dynamic="Required All" />
</Application>
</Directives>
After added above changes, the issue was gone and I am able to run the app in release mode now!
Comments
Post a Comment