Where are the VMware vSphere SDK C # Samples reference needed for classes with VimApi class names?

I cannot compile C # samples from VMware vSphere SDK 5.0 using Visual Studio 2010. The error contains references to the AppUtil and VimApi .

The links in the VS2010 solution file point to these files.

 ..\AppUtil\bin\Debug\AppUtil.dll ..\..\Vim25Service2010.dll ..\..\Vim25Service2010.XmlSerializers.dll ..\..\VimService2010.dll ..\..\VimService2010.XmlSerializers.dll ..\VMware.Security.CredentialStore\bin\Debug\VMware.Security.CredentialStore.dll 

Where are these files located in the SDK or how to get them if not in the SDK?

Two links from other projects in the solution; including the AppUtil namespace. I can update each project to reference the project instead of debugging output.

Is there any build method that I am missing to generate other dlls? Is VimApi part of another download? The release notes do not mention additional downloads to build projects.

+8
c # sdk vmware
source share
5 answers

I hate answering my question, but I came up with a solution. Based on the KB article referenced in readme, I was able to create instructions for VS2010. Run the following commands from the directory with the solution file at the Visual Studio command prompt.

 rem Script to generate required references for VMware vSphere SDK 5.0 cd .. if not exist VimService2010.dll ( wsdl /n:VimApi /o:VimService.cs ..\..\wsdl\vim\vim.wsdl ..\..\wsdl\vim\vimService.wsdl csc /t:library /out:VimService2010.dll VimService.cs sgen /p VimService2010.dll ) if not exist Vim25Service2010.dll ( wsdl /n:Vim25Api /o:Vim25Service.cs ..\..\wsdl\vim25\vim.wsdl ..\..\wsdl\vim25\vimService.wsdl csc /t:library /out:Vim25Service2010.dll Vim25Service.cs sgen /p Vim25Service2010.dll ) 

This script creates the necessary dll files from the wsdl files in the SDK.

+9
source share

Chapter 3 of the Developer Configuration Guide explains how to create a VimService DLL. The jason script above works, but does not take into account the critical (and annoying) step.

After creating the XMLSerializer dll, you need to CHANGE the VimService.cs file to force a reference to the XMLSerializer assembly and remove the built-in XMLIncludeAttribute calls. After editing (as explained in the setup guide), you need to recompile VimService.

It works without editing, but when creating a VimService, it can cause a HUGE delay. I found this to be a 3 minute wait, which was unacceptable. If you encounter a delay, recompile VimService according to the instructions and update the link to the new assembly (and make sure that your assembly does not hang on the old version).

+3
source share

Here you can find instructions for modifying the VimService.cs file.

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=87402

+1
source share

This is a real shame because VMware did not preassemble the builds as before. There are 100 lines of lines for manual editing, if you follow their instructions to do it correctly and avoid freezes. So I wrote some scripts to do it right.

You can find them here ...

+1
source share

I also experienced that the dll is missing. I also decided to use VMware.Vim.dll, but now I also crashed a bit. I used the one that was found in PowerCLI, but suddenly it disappeared.

I already asked for a response from the community, but no one answered it ... look: http://communities.vmware.com/message/1815356#1815356

I also wrote a short โ€œhow to get startedโ€, but I didnโ€™t pay any attention at all. This is also deprecated since the dll is gone now. But maybe this helps when you find the correct dlls: http://communities.vmware.com/message/1806388#1806388

Hope this helps at least show what not to do.

Hi Kjellski

0
source share

All Articles