- Home /
TypeLoadException when taking NAudio.all as reference
I added NAudio.dll to the reference list, and got this error:
Internal compiler error. See the console log for more information. output was: Unhandled Exception: System.TypeLoadException: Could not load type 'NAudio.Wave.WaveCallbackInfo' from assembly 'NAudio, Version=1.5.3.0, Culture=neutral, PublicKeyToken=null'.
at (wrapper managed-to-native) System.Reflection.MonoMethodInfo:get_method_info (intptr,System.Reflection.MonoMethodInfo&)
at System.Reflection.MonoMethodInfo.GetMethodInfo (IntPtr handle) [0x00000] in :0
Anyone knows how to resolve it? Very appreciate.
Answer by coeing · Jul 19, 2012 at 04:35 PM
I saw two reasons for the TypeLoadException in Unity:
The DLL is compiled against .NET 4.0. Unity can only handle DLLs <= .NET 3.5.
The DLL uses other DLLs itself, but those are not in the Plugins folder. Make sure to put all DLLs NAudio.dll requires into Unity's Plugins folder.
Let me know if my answer helped.
Your answer
Follow this Question
Related Questions
Can't load type from DLL. 1 Answer
TypeLoadException: Could not load type '' from assembly 'Assembly-UnityScript'. 0 Answers
TypeLoadException Error with Unity IAP,TypeLoadException Error when implementing Unity IAP 0 Answers
Upgraded to Pro and am now getting a TypeLoadException 0 Answers
Newly installed 2018.1b fails to start tutorial projects (TypeLoadException) 0 Answers