VMware {code} Community
Anonymous
Not applicable

VimService51.XmlSerilization could not load one of its assemblies

Hi, I was wondering if someone can help me please.

I have two workstation - DEV, with PowerCLI 5.1 installed and PROD, with clean Windows installation, .NET 3.5 installed and no PowerCLI.

I have built a class library in C# (let's call it MyV.dll) using Visual Studio 2017. Methods of MyV.dll process data from vSphere, through 'using Vim.VimClient' directive. Idea behind MyV.dll is so that it is possible to connect to vSphere datacentre on computer without PowerCLI installed. I have referenced Vim.VimClient.dll, VimService -25, -40, -45, -50, -51 and VimService{xx}.XmlSerilization.dll in my solution and compiled DLL file.

I then moved MyV.DLL to PROD computer,  copied across all mentioned above VmWare DLL files in the same folder as MyV.dll and tried to load MyV.dll in PowerShell using [system.reflection.assembly]::LoadFrom().

I get an error when calling Connect() method after creating Vim.VimClient object:

unable to load VimService51.XmlSerilization or one of its dependencies...

I am puzlled because mentioned file is in the folder, where Vim.VimClient.dll is.

I have decompiled VimService51.XmlSerilization to see what libraries does it reference and can see that it references some .NET 2.0 classes. .NET 2.0 is installed on PROD machine.

How do I track which dependencies does it fail to load?

Or what is minimum set of DLLs from VmWare to be included so I can make calls to vCenter without having PowerCLI installed? All I am doing is Connect(), GetVM(), Disconnect().

Regards,

Alex

0 Kudos
1 Reply
tganchev
VMware Employee
VMware Employee

Hi, I'd suggest posting your question to the VMware PowerCLI forum. This community is focused on vSphere UI extensibility.

0 Kudos