When using Unity, gives "System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded." error.
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.1k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
Hello. When I put websocketsharp.dll into my Unity project, I get this error.
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 /media/boyned/ExtraSpace/BattleHatsCCG/Battle Hats CCG/Assets/Plugins/websocket-sharp.dll, type System.Runtime.CompilerServices.ExtensionAttribute
The class System.Runtime.CompilerServices.ExtensionAttribute could not be loaded, used in websocket-sharp
Can't find custom attr constructor image: /media/boyned/ExtraSpace/BattleHatsCCG/Battle Hats CCG/Assets/Plugins/websocket-sharp.dll mtoken: 0x0a000001
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure by placing websocket-sharp.dll in the Unity project's Assets/Plugins directory, then start with the ReflectionTypeLoadException and the reported ExtensionAttribute loader error. Done means Unity can load the assembly without the reported compiler and type-loading errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, unity
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100