【问题标题】:UWP Exception occurs in release build, Debug build works fine发布版本中出现 UWP 异常,调试版本工作正常
【发布时间】:2018-11-29 00:00:27
【问题描述】:

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

System.Reflection.MissingMetadataException: Reflection_InsufficientMetadata_NoHelpAvailable:EETypeRva:0x00093618。 如需更多信息,请访问 http://go.microsoft.com/fwlink/?LinkId=623485 在共享图书馆!+0x6171de 在共享库!+0x472787 在 System.Reflection.TypeInfo.get_IsVisible() 在 CMSWindowsApp!+0x9afe7c 在 Newtonsoft.Json.Utilities.DynamicProxyMetaObject.BuildCallMethodWithResult(字符串 方法名,Dynamic.DynamicMetaObjectBinder 绑定器, Collections.Generic.IEnumerable 参数,Dynamic.DynamicMetaObject fallbackResult, Json.Utilities.DynamicProxyMetaObject.Fallback fallbackInvoke) 在 Newtonsoft.Json.Utilities.DynamicProxyMetaObject.CallMethodWithResult(字符串 方法名,Dynamic.DynamicMetaObjectBinder 绑定器, Collections.Generic.IEnumerable 参数, Json.Utilities.DynamicProxyMetaObject.Fallback 倒退, Json.Utilities.DynamicProxyMetaObject.Fallback 后备调用) 在 Newtonsoft.Json.Utilities.DynamicProxyMetaObject.BindGetMember(Dynamic.GetMemberBinder 粘合剂)在 System.Dynamic.GetMemberBinder.Bind(Dynamic.DynamicMetaObject 目标, Dynamic.DynamicMetaObject[] 参数)在 System.Dynamic.DynamicMetaObjectBinder.Bind(Object[] args, Collections.ObjectModel.ReadOnlyCollection 参数,Linq.Expressions.LabelTarget returnLabel)在 SharedLibrary!+0x53c5d2 在 SharedLibrary!+0x53c547 在 SharedLibrary!+0x522de9 在 SharedLibrary!+0x4afb00 在 SharedLibrary!+0x45ef1e 在 SharedLibrary!+0x6054a3 在 SharedLibrary!+0x6056e2 在 SharedLibrary!+0x4d8450 在 SharedLibrary!+0x4d82cd 在 SharedLibrary!+0x38a168 在 共享库!+0x395594 在 System.Func.Invoke(AsyncCallback arg1,对象 arg2) 在 CMSWindowsApp.Screens.URLPage.StoreLocalData(对象 resultObj,字符串 url) 在 CMSWindowsApp!+0xc0b244 在 SharedLibrary!+0x4afb00 在 SharedLibrary!+0x45ef1e 在 SharedLibrary!+0x605acf 在 SharedLibrary!+0x4d8450 在 SharedLibrary!+0x4d860d 在 SharedLibrary!+0x60536e 在 SharedLibrary!+0x6058e7 在 SharedLibrary!+0x6064bc 在 SharedLibrary!+0x4d8450 在 SharedLibrary!+0x4d860d 在 CMSWindowsApp!+0x9bc3c7 在 System.Action.Invoke(运行时.CompilerServices.CallSite arg1,Screens.Home arg2,对象 arg3, Source.ViewModel.AllAssessmentListViewModel arg4) 在 CMSWindowsApp!+0xeb73e3

如何为发布版本解决此问题?

【问题讨论】:

    标签: exception uwp release


    【解决方案1】:

    您需要在应用项目的 Properties 文件夹中的 Default.rd.xml 文件中添加一些条目。 UWP 发布版本使用 .NET Native,您需要在其中显式列出序列化需要存在的类型或命名空间。 Here is a troubleshooter 会帮助你的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-04-05
      • 2020-12-15
      • 1970-01-01
      • 2019-01-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多