VMware Cloud Community
jseiler
Contributor
Contributor

PowerCLI 5.5 Release 2 - change to API - VMware.Vim.dll - VimClient changed from class to Interface



We have a vSphere plugin for the legacy C# vSphere Client that utilizes PowerCLI.  Our plugin was updated for the vSphere 5.5 release to utilize PowerCLI 5.5 (VMware-PowerCLI-5.5.0-1295336) .  This coincided with the VMware's 5.5 release.  Since that time, PowerCLI 5.5 Release 2 (VMware-PowerCLI-5.5.0-1671586) was released on 3/11/2014.  If our plugin is installed on a legacy C# vSphere Client that has PowerCLI Release 2 installed, vSphere disables our plugin.  The pertinent info from the failure trace shows that the constructor for VMware.Vim.VimClient is missing:

System.MissingMethodException: Method not found: 'Void VMware.Vim.VimClient..ctor()'.



Visual Studio's object browser (see attachment for screen shots) shows the API for VMware.Vim.dll changed.  VimClient was changed from a class to an Interface in PowerCLI 5.5 Release 2.  Thus, there is no longer a constructor - resulting in the MissingMethodException.


Note: Examples in PowerCLI User’s Guide for the 5.5 Release 2 still show instantiating VimClient (i.e., VimClient client = new VimClient();)  Also, there was no mention of this API change in the release notes.


It seems that something like this should not have changed in the API because it breaks backwards compatibility.  It especially seems like it should not have changed on a point release (I.E., both versions are some form of 5.5).  Our installer does check that PowerCLI 5.5 is installed.  By convention, it seems like we should not have to check the individual point release of the PowerCLI 5.5 version.


Has anyone else experienced this problem?  If so, do you have a resolution that supported the original PowerCLI 5.5 release and the PowerCLI 5.5 Release 2 versions?

4 Replies
Tony2345
Contributor
Contributor

We are having the same problem with our product. We use the VMware.Vim.dll build 113 and do a new VimClient(). Whenever you install PowerCLI 5.5 Release 2, it installs VMware.Vim.dll build 150 into the GAC which causes the application to break. The only solutions we came up with are to uninstall PowerCLI 5.5 Release 2 and install PowerCLI 5.5 or install our product on to a machine that does not have PowerCLI 5.5 Release 2 on it. Does anyone have a real solution?

Reply
0 Kudos
astardjiev
VMware Employee
VMware Employee

jseiler, Tony2345,

Thanks for reporting the MissingMethodException.

An update from Engineering will follow in a matter of days.

Best,

Hristo

Reply
0 Kudos
jseiler
Contributor
Contributor

Hi Hristo,

Any luck on getting an update from Engineering on this change?

Thanks,

jseiler

Reply
0 Kudos
alanrenouf
VMware Employee
VMware Employee

Hi All,

I am the Product Manager for PowerCLI, firstly I am sorry you have hit this issue and would like to let you know that a workaround for this is to either stick with the PowerCLI 5.5 release as mentioned or to modify your code to use the VimClientImpl class instead of VimClient (which is now an interface).

I know the documentation is not clear and we are looking to address this, I would also appreciate it if you could reach out to me directly (first initial last name at vmware dot com) so that we can talk about how you use this, this client side framework has never been supported and as such may change with releases which is what happened here, again the documentation could be clearer on this too.

Thanks for logging this community question and I look forward to hearing from you.

Alan Renouf

Blog: http://virtu-al.net Twitter: http://twitter.com/alanrenouf Co-author of the PowerCLI Book: http://powerclibook.com