Skip navigation
VMware
Up to Discussions in vSphere Web Services SDK

Developer: vSphere Web Services SDK

Develop management applications for VMware vSphereâ„¢
 

This Question is Possibly Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (6 pts)
1,828 Views 8 Replies Last post: Feb 11, 2010 10:53 AM by dmitrif RSS
Northamm Lurker 1 posts since
Sep 18, 2006
Currently Being Moderated

Mar 31, 2009 9:35 AM

VI SDK and MS Visual Studio 2008

 

Before I go down the road of trying does anyone know if MS Visual Studio 2008 is supported or do I have to stick with MS VS 2005 ?

 

 

Thanks

 

 

Matt

 

 

smallweb Lurker 1 posts since
Dec 22, 2008
Currently Being Moderated
1. Apr 1, 2009 1:55 AM in response to: Northamm
Re: VI SDK and MS Visual Studio 2008

 

Hi,

 

 

VS2008 supports the .Net framework versions 2.0, 3.0 and 3.5, so you can always use VS2008 in stead of VS2005.

 

 

Danny

 

 

paul_xtravirt Expert 227 posts since
Feb 16, 2007
Currently Being Moderated
2. Apr 1, 2009 1:52 PM in response to: Northamm
Re: VI SDK and MS Visual Studio 2008

 

Thats not strictly true. Generating the stubs does not work by default.

 

 

You will need to do the following:

 

  1. Open the visual studio command prompt

  2. Enter the following:  set VSINSTALLDIR="C:\All My Apps\Microsoft Visual Studio 9"

  3. Copy the two WSDL files that you want to use (either 2.5 or 2.0) to the vi-sdk-2.5.0-64154\SDK\samples\DotNet folder

  4. In the visual studio command prompt, change directory to the vi-sdk-2.5.0-64154\SDK\samples\DotNet folder

  5. enter the following command:   genvimstubs.cmd .\
     
     
     
         If you found this helpful, please consider awarding points

 

If you found this helpful, please consider awarding some points
Peteski Lurker 4 posts since
Feb 23, 2009
Currently Being Moderated
3. Apr 14, 2009 4:32 PM in response to: paul_xtravirt
Re: VI SDK and MS Visual Studio 2008

 

Unfortunately this isn't the whole story. Since the entire VMWare SDK is predicated on VS 2005 (or VS 2005 Express), you need to alter some of the paths in the genvimstubs.cmd file for it to work properly. It's pretty easy, just substitute the attached updated gcmvimstubs2.cmd file and it will work- assuming you have

 

  1. VC# 2008EE (or VS 2008)

  2. .net framework 3.5

  3. MS SDK 6.1 (if this didn't come with VS you may need to download the platform sdk from MS: http://www.microsoft.com/downloads/details.aspx?FamilyID=e6e1c3df-a74f-4207-8586-711ebe331cdc&displaylang=en

 

All I've done is put in the full paths to some of the exes like csc.exe, wdsl.exe and sg.exe using the correct ones for VS 2008, .net 3.5 and SDK 6.1.

 

 

This will properly generate the stubs but you should follow the directions for the other parts like compiling the dlls to a debug .exe (last step in build2005.cmd): "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VCSExpress.exe" "C:\**VMWareSDKinstallDir*\SDK\samples\DotNet\cs\Samples2005.sln* /rebuild Debug"

 

 

Note1: "samples2005.sln" may need to be opened in VC# 2008 GUI and converted to a VC# 2008 sln file before running this!

 

 

Note2: the path given above for "VCSExpress.exe" will be different for those using VS 2008 (devenv.exe (whew!)

 

 

Attachments:
harkamal Expert 324 posts since
Mar 19, 2009
Currently Being Moderated
4. Apr 30, 2009 3:15 AM in response to: Peteski
Re: VI SDK and MS Visual Studio 2008

I recently started using visual studio 2008 and wrote hello world application using c# which is a vi client plugin.

 

Can someone explain why are the stubs needed for vi development, does this make life easier ? an example would be greatly appreciated.

Expert 261 posts since
Sep 30, 2007
Currently Being Moderated
5. Apr 30, 2009 8:56 AM in response to: harkamal
Re: VI SDK and MS Visual Studio 2008

Stubs are used to consume WebService exposed to mange VI. You can perform various tasks to manage your Virtual Infrastrure which you perform using VI Client programmatically consuming the APIs exposed. VI APIs are the only available Management interface for VI.

ber05 Novice 5 posts since
Apr 26, 2007
Currently Being Moderated
6. Aug 26, 2009 5:56 AM in response to: Peteski
Re: VI SDK and MS Visual Studio 2008

Super, it works!

 

..\SDK\samples\DotNet> genvimstubs.cmd C:\Users\ber\SDK\wsdl\vim25 Vim25Api stage Vim25Objects.cs . Vim25Service2005

 

..\SDK\samples\DotNet> genvimstubs.cmd C:\Users\ber\SDK\wsdl\vim VimApi stage VimObjects.cs . VimService2005

RobMokkink Expert 811 posts since
Jun 7, 2005
Currently Being Moderated
7. Feb 8, 2010 11:26 PM in response to: ber05
Re: VI SDK and MS Visual Studio 2008

 

I was allways looking for a reason to start learning C#. I installed everything, but why would you change the VSINSTALLDIR?

 

 

 

 

 

Thanks in advance.

 

 

dmitrif Hot Shot 99 posts since
May 13, 2008
Currently Being Moderated
8. Feb 11, 2010 10:53 AM in response to: RobMokkink
Re: VI SDK and MS Visual Studio 2008

Because not all products get installed on C: etc.

 

For instance, my primary hard drive for reasons I already forgot is K:

 

On the topic, I've been using 2008 with VI 3.5 and then 4.0 SDK for a couple of years now, it required some minor trivial modification in batch files that came with the SDK and all works just fine, our application uses .NET 3.5, the SDK assembly is compiled with wsdl from .NET 2.0.

Dmitri Fedorov BridgeWays, a division of Xandros www.bridgeways.ca

Bookmarked By (0)

Communities