Unity dll Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the mod

报错内容:

Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
  at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
  at System.Reflection.Assembly.GetTypes () [0x00000] in :0 
  at Mono.CSharp.RootNamespace.ComputeNamespaces (System.Reflection.Assembly assembly, System.Type extensionType) [0x00000] in :0 
  at Mono.CSharp.RootNamespace.ComputeNamespace (Mono.CSharp.CompilerContext ctx, System.Type extensionType) [0x00000] in :0 
  at Mono.CSharp.GlobalRootNamespace.ComputeNamespaces (Mono.CSharp.CompilerContext ctx) [0x00000] in :0 
  at Mono.CSharp.Driver.LoadReferences () [0x00000] in :0 
  at Mono.CSharp.Driver.Compile () [0x00000] in :0 
  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in :0 

Missing method .ctor in assembly /Users/apple/Downloads/sh_test/sh_test/Assets/plugin/Haptic.dll, type System.Runtime.Versioning.TargetFrameworkAttribute
The class System.Runtime.Versioning.TargetFrameworkAttribute could not be loaded, used in Haptic
Can't find custom attr constructor image: /Users/apple/Downloads/sh_test/sh_test/Assets/plugin/Haptic.dll mtoken: 0x0a000025

解决方法:

使用MonoDevelop/Visual Studio生成dll
右键项目=>Options=>General=>Target framework=>Mono/.Net3.5(.Net Framewrok3.5)=>Build

Unity dll Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the mod_第1张图片

Unity dll Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the mod_第2张图片


你可能感兴趣的:(Unity)