Using Visual Studio 2015, I need to create a Universal Windows App and I want to add a Portable Class Library in the same solution. In this Portable Class Library I want to add a reference to Microsoft.Kinect.dll . But when I execute the code in Local Machine, I get the following error:
Exception thrown: 'System.BadImageFormatException' in AppKinect.exe
Additional information: Could not load file or assembly 'Microsoft.Kinect, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058)
Is it possible to solve this problem? Could I add a reference to this .dll in order to indirectly use Kinect v2 in Universal Windows app? As I read that for now Universal Windows app doesn't support using Kinect v2.
I also try to add a manual reference to Microsoft.Kinect.dll using
AssemblyName longName = new AssemblyName("Microsoft.Kinect.dll, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35");
Assembly assem = Assembly.Load(longName);
but I obtain the same error.
Thanks in advance!
User contributions licensed under CC BY-SA 3.0