- Home /
Trying to use SDK as plugin that compiled with .NET Framework 4.0 in Unity
Hello! I am trying to use Canon's ED-SDK in Unity for remote control the camera (It will be our Interactive Photo Booth) to take picture, which is written in C# and compile with .NET framework 4.0. However, Unity and MonoDeveloper is not support .NET framework 4.0 and following Error Message will be showed :
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 <filename unknown>:0
at Mono.CSharp.RootNamespace.ComputeNamespaces (System.Reflection.Assembly assembly, System.Type extensionType) [0x00000] in <filename unknown>:0
at Mono.CSharp.RootNamespace.ComputeNamespace (Mono.CSharp.CompilerContext ctx, System.Type extensionType) [0x00000] in <filename unknown>:0
at Mono.CSharp.GlobalRootNamespace.ComputeNamespaces (Mono.CSharp.CompilerContext ctx) [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.LoadReferences () [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0
Missing method .ctor in assembly C:\Users\Jason\Documents\((MM))\Canon\New Unity Project 5\Assets\Plugins\Canon\EDSDKNode.dll, type System.Runtime.Versioning.TargetFrameworkAttribute
The class System.Runtime.Versioning.TargetFrameworkAttribute could not be loaded, used in EDSDKNode
Can't find custom attr constructor image: C:\Users\Jason\Documents\((MM))\Canon\New Unity Project 5\Assets\Plugins\Canon\EDSDKNode.dll mtoken: 0x0a000004
This is a mini project so I have full control of the PC's hardware and software. I think the problem could be solved easily but I just don't know how, I am still too fresh to the IT stuff.
As far as I know does Unity only support 2.0 .NET Frameworks.
Hey, did you launched Canon EDSD$$anonymous$$ within Unity successfuly? I was trying to do the same, but had faced problem with saving photos on PC.
Answer by Cynikal · Nov 04, 2016 at 11:17 AM
Unity can support 2.0 and 3.5 DLL's. Do they have those options? Do they allow you to compile the dll yourself? just retarget them.
Also, you'll need to put the 2.0/3.5 dll in a "Plugins" folder (if you havent already).
Thank you for your reply. As my english is pretty bad I will try to ask the question again in another way at a new question.
Your answer
Follow this Question
Related Questions
Image Gallery 2 Answers
Advantages of .NET framework 4.6 upgrade? 1 Answer
Unity 2021.2 .Net Framework 4.7.2 0 Answers
Scripting Generic stat modifiers. 0 Answers
Getting SSH.NET to work in Unity 1 Answer