The above does not work for version 1.17 of the VmTasks tools.
If you target a .NET framework prior to 4.0 you get this error
'Vestris.VMWareLib.dll', or one of its dependencies, requires a later version of the .NET Framework than the one specified in the project.
when you try to add the reference is VS2010.
If the Embed Interop Types flag for Interop.Vix.COM is set to true (default), then this line in my code
private VMWareVirtualHost mHost;
gives you this complilation error
Type 'Vestris.VMWareLib.VMWareVirtualHost' from assembly '~\Vestris.VMWareLib.dll' cannot be used across assembly boundaries because a type in its inheritance hierarchy has a generic type parameter that is an embedded interop type.
If the Embed Interop Types flag for Interop.Vix.COM is set to false, then the above compilation error disappears to be replaced with the error on this line of code:
Interop type 'VixCOM.Constants' cannot be embedded. Use the applicable interface instead.
Any suggestions on how to upgrade this code from using VixCCOMWrapper DLL to using VmTasks v1.17?
Or how to use "the applicable interface"?
Or which is the applicable interface for VixCOM.Constants.VIX_VMPOWEROP_NORMAL?