I get exception?

Dec 5, 2010 at 10:02 PM

Hi,

 

  I just try to get NKinect working, but when I try compile the code I get FileNotFoundException: "Could not load or assembly 'NKinect.dll' or one of its dependencies. The specific module could not be found."

I have windows7 and VS2010. Could this have something to do with user rights? I start vs2010 as addministrator. Do you guys have any hints?

 

Coordinator
Dec 5, 2010 at 10:05 PM

Are you trying to run NKinectTest? Please make sure that the NKinect project is being built by right clicking the project and choosing "Build."

Dec 5, 2010 at 10:13 PM

I just download NKinect.dll to my computer and write my own code. I but NKinect.dll as reference to this project. If I build this project it says "build success". But if I try run application after that nothing seems to happen. I get this exception message when I try to run application from VS2010 by pressing F5 function button.

Coordinator
Dec 5, 2010 at 10:14 PM

Make sure that your project is using .NET Framework 4, not Client Profile.

Dec 5, 2010 at 10:28 PM

I changed Client Profile to .Net framework 4, but I still get same exception message.

Coordinator
Dec 5, 2010 at 10:32 PM

Hrm. Have you verified that the dll is being copied to the output directory?

Dec 5, 2010 at 10:37 PM

Yes, it is there. NKinect.dll and also NKinect.pdb.

Coordinator
Dec 5, 2010 at 10:38 PM

Try changing your project to x86 instead of "Any" or x64

Dec 5, 2010 at 11:12 PM

It takes for a while, because I have visual c# express and there isn't a possibility to change target platform so easy, but now I manage to change it, but no, no help for that.

Coordinator
Dec 5, 2010 at 11:14 PM

Can you send me your project? I'll check it out and see what's wrong.

Also, please check if NKinectTest can run.

Dec 5, 2010 at 11:17 PM

Yes I can send it, but how I will do that. Do you have email adress where I send it or what?

Coordinator
Dec 5, 2010 at 11:37 PM
Edited Dec 5, 2010 at 11:50 PM

There's something wrong with your .csproj file. It's set to "Any CPU" on my end... seems the file itself is corrupted.

 

More info on changing platform: http://social.msdn.microsoft.com/Forums/en/csharpgeneral/thread/32151505-13e0-482b-8c46-bd5cb9cba43f

Dec 7, 2010 at 6:53 PM

I am using Visual Studio 2010 Professional and create a WPF application.

I also encounter the same issue.

any other suggestion?

 

Coordinator
Dec 7, 2010 at 7:00 PM

Can you try installing both Visual C++ 8.0 AND 9.0 redistributables?

Dec 9, 2010 at 7:18 AM

Holaman did you get it work? I'am still waiting my VS2010 prof edition....

 

 

 

 

Coordinator
Dec 9, 2010 at 2:45 PM
Sorry, I haven't been able to work on NKinect lately. Rough week at work.  One last idea; can you compile the dll? Download the development tree from svn.
Dec 14, 2010 at 11:05 AM

I installed VS2010 professional to my computer and tried compile the code, but still same exception. I even try in other computer, but no.

Coordinator
Dec 14, 2010 at 12:33 PM
Edited Dec 21, 2010 at 6:15 AM

That's odd. Have you installed CL NUI Preview? (v1121) You need to have CLNUIDevice.dll in the same folder as the executable.

Jan 6, 2011 at 4:04 PM

hi to anyone :) . can you help me why i getting this error ? the project completely has been downloaded but it couldn't been run because of opencv components and when i corrected the variables by addressing directly to them ( such as f:\...) the project get me this error !  

Error 10 error C2660: 'CreateNUICamera' : function does not take 0 arguments c:\users\mohammad\desktop\nkinect-4301\nkinect\CLKinect.h 31 1 NKinect

 

and these :

Error 1 error LNK1181: cannot open input file 'opencv_objdetect220.lib' C:\Users\mohammad\Desktop\nkinect-4301\NKinect.OpenCV\LINK NKinect.OpenCV Error 5 error C2660: 'CreateNUIMotor' : function does not take 0 arguments c:\users\mohammad\desktop\nkinect-4301\nkinect\CLKinect.h 32 1 NKinect Error 6 error C3861: 'GetNUIMotorSerial': identifier not found c:\users\mohammad\desktop\nkinect-4301\nkinect\CLKinect.h 45 1 NKinect Error 11 error C1903: unable to recover from previous error(s); stopping compilation c:\users\mohammad\desktop\nkinect-4301\nkinect\MouseTracker.h 103 1 NKinect Error 12 The referenced assembly "C:\Users\mohammad\Desktop\nkinect-4301\Release\NKinect.dll" was not found. If this assembly is produced by another one of your projects, please make sure to build that project before building this one. NKinectTestError 14 The referenced assembly "C:\Users\mohammad\Desktop\nkinect-4301\Release\NKinect.dll" was not found. If this assembly is produced by another one of your projects, please make sure to build that project before building this one. NKinect.MouseError 16 The referenced assembly "C:\Users\mohammad\Desktop\nkinect-4301\Release\NKinect.dll" was not found. If this assembly is produced by another one of your projects, please make sure to build that project before building this one. NKinect.Calibration

Coordinator
Jan 6, 2011 at 4:08 PM
Please download OpenCV 2.2 and CL NUI v1121. The latest version has a few bugs so we're still using the preview.
Jan 6, 2011 at 5:25 PM

hi dear all and specially bscheiman 

i found out how to correct most of it

public: CLKinect(int idx) {

 _serial = GetNUIDeviceSerial(idx);

 
cam = CreateNUICamera(_serial);

motor = CreateNUIMotor(_serial);
RawDepth = new USHORT[640 * 480]; RawPixels = new DWORD[640 * 480];
Depths = gcnew array<array<double>^>(640);
for (int i = 0; i < 640; i++) Depths[i] = gcnew array<double>(480);
SetLed(Green); SetPosition(0);

 

 

 

 

the bold sections are the corrected sections... but i finally have this error only :

Error 19 error LNK1181: cannot open input file 'opencv_objdetect220.lib' C:\Users\mohammad\Desktop\nkinect-4301\NKinect\LINK NKinect

Coordinator
Jan 6, 2011 at 5:31 PM

CL NUI versions other than v1121 aren't supported. However, if you insist, most of the code is there... only commented. The reason behind this is that on my development machine, the latest versions don't work. So we're sticking with the one that works for everyone.

 

Please download and install OpenCV 2.2 from here: http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.2/OpenCV-2.2.0-win32-vs2010.exe/download

Install it to C:\OpenCV2.2

Jan 6, 2011 at 5:44 PM
Edited Jan 6, 2011 at 6:03 PM

thanks a lot ,but i've downloaded the version you told but still have that damn error! just 1 error :(  cannot open input file 'opencv_objdetect220.lib' 

my platform visual studio 2010 ultimate

opencv 2.2

CL-NUI-Platform-1.0.0.1210

i couldn't find the version you mentioned but the error is about the open cv library :(

thanks again :)

Jan 6, 2011 at 6:10 PM

ok now i have this error !!!

Error 21 The type or namespace name 'AForge' could not be found (are you missing a using directive or an assembly reference?) C:\Users\mohammad\Downloads\Compressed\nkinect-4301\NKinect.Mouse\FrmMain.Designer.cs 33 36 NKinect.Mouse

 the previous error has gone by changing installation path of opencv

thanks for your help :)

 

Coordinator
Jan 6, 2011 at 6:13 PM

Thought I had removed all AForge references. Just delete them, they're no longer needed.

 

Please open a new discussion.