I have a UWP app that works online and offline, it works fine in the debug mode and release mode. But when i compile using .Net Native Tool Chain, i usually have two major exceptions.
Exception thrown: 'System.Reflection.MissingMetadataException' in System.Private.Reflection.Core.dll in MobileServiceClient Additional information: 'Microsoft.WindowsAzure.MobileServices.PlatformInformation' is missing metadata. For more information, please visit http://go.microsoft.com/fwlink/?LinkID=392859 If there is a handler for this exception, the program may be safely continued.
I have searched online how to solve this problem, no suceess yet, this has stopped me from uploading my app to store. Please help a newbie to UWP.
The .NET Native goes through the assembly and strips out everything unused, which may be a problem when you use reflection somewhere in your code and the compiler is unable to find it. To fix this, you first have to pin-point where the reflection is used and then update the app's rd.xml
file to instruct the .NET Native toolchain what needs to stay in the resulting assembly.
The first exception is giving you a link for an on-line rd.xml
"generator" . You just need to fill out the form and it will generate the requried XML definitions for you.
The second exception may be the source of your problems. As the message says, open the InnerException
property and investigate the message. That should tell you what couldn't be initialized and what should be then added to rd.xml
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.