VMware {code} Community
kri-2
Hot Shot
Hot Shot

C# - shipping vmware.vim.dll with the .exe

Hi,

this may be a .net specific problem, but maybe someone has some hints for me.

I wrote a little program in c# (vs2010) which is able to do some poweroperations (just like the example in the sdk doc pdf) on vms using the reference to vmware.vim.dll and loading it with 'using VMware.Vim'.

My aim is to have a program that can do some actions to the vcenter without having installed any vmware packages.

Compiling this project with csc and the dll reference works fine ( csc.exe pow.cs /out:pow.exe /r:vmware.vim.dll ) and the program runs fine. But after copying the .exe and the vmware.vim.dll file to another computer and trying to start it, it complains, that the 'file or assembly Vimservice50 could not be found'.

Any help would be appreciated!

Chris

0 Kudos
1 Reply
icnocop2
Contributor
Contributor

I was able to resolve this issue by manually finding and copying "VimService50.dll" and "VimService50.XmlSerializers.dll".

See these links:

Re: using VMware.Vim

http://blog.tonywall.co/2013/04/extracting-vmware-web-service-proxies-for-net/

I could only find the Native Images *.ni.dll on my system, so I had to manually extract those dll files from the vSphere PowerCLI msi using activescott/lessmsi: A tool to view and extract the contents of an Windows Installer (.msi) file..

0 Kudos