VMware Cloud Community

Access to VCenter (5.5) with Visual Studio and C# To Create a Application "System.IO.FileNotFoundException"

Hello there,

For a while now im working in a new Company as Software Engineer.

The Company wants me now to Create a simple Software to read out some Datas from our VCenter (Storage Usage, RAM Usage and Average CPU Usage)and save them into a Database.

For this i followed this Tutorial:


However i dont get it to work.

I Installed the latest VMware PowerCLI and insert a Reference in the Visual Studio Project.


Now i simply try to make a Connection to the VCenter Server When i Click a Button just for Testing but it isn't working.

The Code is Simple:


VimClientImpl c = new VimClientImpl();


c.Login("xxx", "xxx");

if i Start now it throws me out this Exception.

System.IO.FileNotFoundException: "The file or assembly system.runtime, version=, culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" or a dependency on it could not be found. The system cannot find the specified file."

I Also tried different Variants because i found them while Searching in Google:

VimClient c = new VimClientImpl();


c.Login("xxx", "xxx");


VimClient c = new VimClient();


c.Login("xxx", "xxx");

(Here i cant even Start the Programm because he tells me new VimClient(); is a Abstract class or Interface)

To My Dev System:

Windows 10 Professional
Visual Studio 2019
.Net 3.5 and .Net 4.8
.Net Core

VMware PowerCLI

The Servers are Running on ESXI in a Cluster Environment.

I have no Clue what is wrong or what i can do now.

I have to say that the Documentation from VMware is very Poorly... Especial for someone who never worked before with that.

I hope someone can give me some Hints or Advice whats wrong and what i need to heed for..

Thanks in Advance.


0 Kudos
0 Replies