Recently used vmware-vsphere-sdk-5.0.0-429209 to control the operation of the virtual machine using dotnet, found a lot of yellow exclamation mark, with the solution:
VMWARE-VSPHERE-SDK-5.0.0-429209\SDK\VSPHERE-WS\WSDL This directory has vim and VIM25 two directories, with which they generate a response DLL file
Open the Visual Studio Developer tool and enter the following command: (the WSDL folder has been copied to the F drive)
WSDL /n:vimapi /o: f:\vimservice. CS F:\wsdl\vim\vim. WSDL f:\wsdl\vim\vimservice. WSDL (Generate CS file)
csc /t:library /out:f:\VimService2010. DLL f:\vimservice. CS (Generate DLL)
SGen /p f:\VimService2010. DLL (generate XML serialization DLL)
VIM25 directory, you can generate VimService2010.dll, VimService2010.XmlSerializers.dll, and Vim25Service2010.dll, Vim25Service2010.XmlSerializers.dll, re-add the reference, solve the problem.
--------------------------------------------------------------------------------
Translated from: http://blog.csdn.net/s_nuclear/article/details/17712071
Where the WSDL and SGen commands are located: "C:\Program Files (x86) \microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\"
The location of the CSC command is in: C:\WINDOWS\MICROSOFT.NET\FRAMEWORK\V4.0.30319\CSC
The commands I use are: (where the last step of generating the XML Serialization DLL command takes a long time, please wait patiently)
"C:\Program Files (x86) \microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 TOOLS\WSDL"/n:vimapi/o:d:\temp\wsdl\ VimService.cs D:\Temp\wsdl\vim\vim.wsdl D:\Temp\wsdl\vim\vimService.wsdl
C:\windows\microsoft.net\framework\v4.0.30319\csc/t:library/out:d:\temp\wsdl\vimservice2010.dll D:\Temp\wsdl\ VimService.cs
"C:\Program Files (x86) \microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\sgen"/P D:\Temp\wsdl\VimService2010.dll
"C:\Program Files (x86) \microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 TOOLS\WSDL"/n:vim25api/o:d:\temp\wsdl\ Vim25Service2010.cs D:\Temp\wsdl\vim25\vim.wsdl D:\Temp\wsdl\vim25\vimService.wsdl
C:\windows\microsoft.net\framework\v4.0.30319\csc/t:library/out:d:\temp\wsdl\vim25service2010.dll D:\Temp\wsdl\ Vim25Service2010.cs
"C:\Program Files (x86) \microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\sgen"/P D:\Temp\wsdl\Vim25Service2010.dll
"Go" vmware-vsphere-sdk apputil, VimService2010, vim25service2010 for yellow exclamation mark resolution