[libvirt] System.DllNotFoundException

arnaud.champion at devatom.fr arnaud.champion at devatom.fr
Fri Oct 29 07:38:13 UTC 2010


?Hi,

what do you mean when you say "I use the .cs file you release to create a dll project" ?
C# bindings are provided with a visual studio 2010 solution, I think it's better to use it if you can. If you can't (because you have vs2005 or vs2008), please re-create a solution with all C# bindings codes.

Be sure you have the dll in your Debug directory :
libcurl-4.dll
libgcrypt-11.dll
libgnutls-26.dll
libgpg-error-0.dll
libportablexdr-0.dll
libtasn1-3.dll
libvirt-0.dll
libxml2-2.dll

Also, be carefull about one thing : these dll must be in the directory of the executable. I mean if you create a project "testBinding" which produce "testBindings.exe", then these dlls must be in the same directory of "testBindings.exe".

You can also use "depends.exe" (http://www.dependencywalker.com/) which is a tool used to check dll dependency. You open your libvirt-0.dll with it and see if there is no missing dll (maybe a dll miss you, and I don't see it because my system ever own it, I don't know).

Arnaud



From: 黄亮 
Sent: Friday, October 29, 2010 3:51 AM
To: arnaud.champion at devatom.fr 
Subject: System.DllNotFoundException


Hello Arnaud

I've compiled libvirt using photron scripts and got the libvirt-0.dll
I use the .cs file you released to create a dll project, and get CSharpDll.dll
Then I create a new project to invoke CSharpDll.dll, I got a System.DllNotFoundException while "Libvirt.Connect.Open" is trying to work.
The exception shows libvirt-0.dll cannot be found.
I tried to put libvirt-0.dll everywhere. In the same dir with .sln, with .cs file, in Debug dir, even in Windows/System32 dir. But I got no luck. It's still stuck.

So I need your help to get me out of the mess. Would you please tell me where I may go wrong?
Many Thanks

2010-10-29 

--------------------------------------------------------------------------------

Lancer 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20101029/6c5b5cc2/attachment-0001.htm>


More information about the libvir-list mailing list