Hey All,
I am trying to use the System.CodeDom to compile some code dynamically. I have an external DLL that handles all the CodeDom related code, and I am referencing that in my Unity project. However, when I implement the code using that DLL, when I switch back to Unity it throws this error:
Internal compiler error. See the console log for more information. output was:
Unhandled Exception: System.TypeLoadException: Could not load type 'System.CodeDom.CodeCompileUnit' from assembly 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
at (wrapper managed-to-native) System.MonoType:GetMethodsByName (string,System.Reflection.BindingFlags,bool,System.Type)....
You'll see in that exception that it says Version=2.0.0.0 That is because I recompiled my DLL to target .Mono 2.0 instead of Mono 4.0, thinking that would help, but it didnt.
I already checked that my Edit -> Project Settings -> Player Settings -> .NET 2.0 Subset was checked, per a previous post on here.
Any suggestions on how to fix this issue?
↧