Exception 发布版本中出现UWP异常,调试版本工作正常

Exception 发布版本中出现UWP异常,调试版本工作正常,exception,uwp,release,Exception,Uwp,Release,在发布版本中,安装build应用程序。但是当我运行应用程序时,我得到了以下异常。但它在调试构建中运行良好 System.Reflection.MissingMetadataException: 反射\元数据不足\无可用帮助:EETypeRva:0x00093618。 有关更多信息,请访问 在共享图书馆+0x6171de 在共享图书馆+0x472787 在System.Reflection.TypeInfo.get_IsVisible()中 在CMSWindowsApp+0x9afe7c 位于Ne

在发布版本中,安装build应用程序。但是当我运行应用程序时,我得到了以下异常。但它在调试构建中运行良好

System.Reflection.MissingMetadataException: 反射\元数据不足\无可用帮助:EETypeRva:0x00093618。 有关更多信息,请访问 在共享图书馆+0x6171de 在共享图书馆+0x472787 在System.Reflection.TypeInfo.get_IsVisible()中 在CMSWindowsApp+0x9afe7c 位于Newtonsoft.Json.Utilities.DynamicProxyMetaObject.BuildCallMethodWithResult(字符串 methodName,Dynamic.DynamicMetaObjectBinder绑定器, Collections.Generic.IEnumerable args,Dynamic.DynamicMetaObject fallbackResult, Json.Utilities.DynamicProxyMetaObject.Fallback 后备调用)在 Newtonsoft.Json.Utilities.DynamicProxyMetaObject.CallMethodWithResult(字符串 methodName,Dynamic.DynamicMetaObjectBinder绑定器, Collections.Generic.IEnumerable args, Json.Utilities.DynamicProxyMetaObject.Fallback 退路, Json.Utilities.DynamicProxyMetaObject.Fallback 回退(调用) 位于Newtonsoft.Json.Utilities.DynamicProxyMetaObject.BindGetMember(Dynamic.GetMemberBinder 活页夹)在 System.Dynamic.GetMemberBinder.Bind(Dynamic.DynamicMetaObject目标, Dynamic.DynamicMetaObject[]args)位于 System.Dynamic.DynamicMetaObjectBinder.Bind(对象[]参数, Collections.ObjectModel.ReadOnlyCollection 参数,Linq.Expressions.LabelTarget returnLabel)位于 共享图书馆+0x53c5d2在 共享图书馆+0x53c547 at 共享图书馆+0x522de9位于 共享图书馆+0x4afb00 at 共享图书馆+0x45ef1e位于 共享图书馆+0x6054a3 at 共享图书馆+0x6056e2位于 共享图书馆+0x4d8450 at 共享图书馆+0x4d82cd地址 共享图书馆+0x38a168 at 共享图书馆+0x395594 at System.Func.Invoke(异步回调 arg1,对象arg2)位于 CMSWindowsApp.Screens.URLPage.StoreLocalData(对象resultObj,字符串 url)在CMSWindowsApp+0xc0b244 at 共享图书馆+0x4afb00 at 共享图书馆+0x45ef1e位于 共享图书馆+0x605acf at 共享图书馆+0x4d8450 at 共享图书馆+0x4d860d at 共享图书馆+0x60536e at 共享图书馆+0x6058e7 at 共享图书馆+0x6064bc地址 共享图书馆+0x4d8450 at 共享图书馆+0x4d860d at CMSWindowsApp+0x9bc3c7 at System.Action.Invoke(Runtime.CompilerServices.CallSite arg1,屏幕。主arg2,对象arg3, Source.ViewModel.AllAssessmentListViewModel arg4)位于 CMSWindowsApp+0xeb73e3


如何为发布版本修复此问题?

您需要在应用程序项目的属性文件夹中的Default.rd.xml文件中添加一些条目。UWP发布版本使用.NET Native,其中需要显式列出序列化需要存在的类型或名称空间。那会对你有帮助的