Question by
Andreashej · Nov 15, 2016 at 12:36 PM ·
unity 5opencv
OpenCVSharp in Unity error
Hi everyone,
I am trying to add OpenCVSharp to a unity project. I have downloaded the dll-files from here: https://github.com/shimat/opencvsharp/releases
I have made it work so far that I can use the OpenCVSharp package and everything in it in Visual Studio, when editing a script, and it recognizes everything. However, Unity is still giving me an 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 <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
The following assembly referenced from C:\Users\ah\Documents\P3\Assets\Plugins\OpenCvSharp-3.1.0\OpenCvSharp.Extensions.dll could not be loaded:
Assembly: PresentationCore (assemblyref_index=4)
Version: 3.0.0.0
Public Key: 31bf3856ad364e35
The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (C:\Users\ah\Documents\P3\Assets\Plugins\OpenCvSharp-3.1.0\).
Could not load file or assembly 'PresentationCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.
I have tried changing the build settings from .NET 2.0 subset to full, but with no success. Any suggestions?
Comment
Your answer

Follow this Question
Related Questions
AR face Augmentation in Unity 0 Answers
How to use watershed in OpencvForUnity 0 Answers
The project Assembly-Csharp cannot be started directly 1 Answer
Run more than expected number 1 Answer