- Home /
VS 2012 CLI Wrapper DLL
Hello,
I wanted to be able to use a native C++ DLL. After doing some googling it seemed the proper course was to write a .Net CLI DLL wrapper and add it to my plugins folder. Upon doing this, Unity immediately threw a generic error, and I realized VS 2012 was using .Net 4.5 which is not compatible with Unity. I then went in and manually edited my VS 2012 project file for the CLI Wrapper DLL and changed to the target framework to 3.5. This got me passed the error when I opened Unity. However when I try to run my project I get the following error:
TypeLoadException: Could not load type 'System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute' from assembly 'MyDLLName'
Upon inspecting my MyDLLName.dll I see that both mscorlib version 2.0 and version 4.0 are in my dll. I believe this is the cause of the error... Does anyone have any suggestions, I am still new to Unity.
Your answer