Hi guys!
I am using VMWare Workstation 10.0.1 (and VIX 1.13 that is installed with it). Now I need to manage my VMs with a C# app running on the host (win7 x64). I want to use VMWareTasks 1.7 for this but can't make it work.
I have added the reference to the Vestris.VMWareLib.dll and the using.
To test that everything is working, I copied the method GettingStartedWorkstation() to my class. But I can't build.
Building causes this error:
Error 163 The type 'Interop.VixCOM.ISnapshot' is defined in an assembly that is not referenced. You must add a reference to assembly 'Interop.VixCOM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1a2e7e25925ba452'.
When I add a reference to 'Interop.VixCOM.dll I get a number of errors:
Error 177 'Vestris.VMWareLib.VMWareSnapshot' does not contain a definition for 'RemoveSnapshot' and no extension method 'RemoveSnapshot' accepting a first argument of type 'Vestris.VMWareLib.VMWareSnapshot' ...
Error 176 'Vestris.VMWareLib.VMWareSnapshot' does not contain a definition for 'RevertToSnapshot' and no extension method 'RevertToSnapshot' accepting a first argument of type 'Vestris.VMWareLib.VMWareSnapshot'...
Error 164 'Vestris.VMWareLib.VMWareVirtualHost' does not contain a definition for 'ConnectToVMWareWorkstation' and no extension method 'ConnectToVMWareWorkstation' accepting a first argument of type 'Vestris.VMWareLib.VMWareVirtualHost'...
Error 166 'Vestris.VMWareLib.VMWareVirtualHost' does not contain a definition for 'Open' and no extension method 'Open' accepting a first argument of type 'Vestris.VMWareLib.VMWareVirtualHost'...
Error 169 'Vestris.VMWareLib.VMWareVirtualMachine' does not contain a definition for 'LoginInGuest' and no extension method 'LoginInGuest' accepting a first argument of type 'Vestris.VMWareLib.VMWareVirtualMachine'...
And so on... None of the methods in Vestris.VMWareLib used in GettingStartedWorkstation() are found.
I removed the reference to Interop.VixCOM and tried to build the VMWare tasks solution in VMWareTasks-1.7.zip, assuming the problem was the version of VIX (1.13 vs 1.11).
Trying to build the solution in VMWareTasks-1.7.zip is a total mess:
1. The build.cmd file makes assumptions on where Visual Studio is installed. Mine is not installed in ProgramFilesDir, so I had to edit build.cmd to make it build. (could be more user frendly)
2. I realized I had to install MSBuildCommunityTasks (have not seen this in any dependencies, but maybee I missed it?)
3. The file master.snk is missing in VMWareTasks-1.7.zip, so i downloaded vmwaretasks-master.zip from github and copied the file to 1.7 \Source
Now when I try to build WMWareLib or WMWareTools in VMWareTasks-1.7.zip I get a number of errors (have not tried to build the other projects):
Error 30 The name 'Constants' does not exist in the current context...
Error 24 The type or namespace name 'ICallback' could not be found (are you missing a using directive or an assembly reference?)...
I get the error 24 also for symbols: IHost, IHost2, IJob, Interop, ISnapshot, IVixHandle, IVM and IVM2
I don't know how to solve this. Interop.VixCOM.dll is created and has the same size as for Vix 1.11 (32Kb). But I don't know if it is right or wrong.
What is the problem?
Is it at all possible to use VMWare Tasks with Workstation 10.0.1 and Vix 1.13 ?
Please help, I am stuck!