Unity 编辑器直接运行正常,打包后的程序运行异常问题

发布时间 2023-06-16 11:22:46作者: 青叶煮酒

 打包后的程序运行报错:

base = "System.MissingMethodException: Default constructor not found for type log4net.Repository.Hierarchy.Hierarchy\r\n
at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic, System.Boolean wrapExceptions) [0x00076] in <4899add98f17447bac12e1861ae2d...

 

解决方案:

Managed Stripping Level 改为 Disabled 即可(之前被改成了 Low)