How to use two different versions of the stub of Web Services SDK files in a single project (5.5 and 6.0)

Hello

I have a project that uses the vSphere 5.5 management SDK (I built the stub files according to the documentation) and have these in my c# Solution. Everything works beautifully. My class files that interact with vSphere all have a use statement as follows:

using Vim25Api;

All fine so far.

Now, I want to be able to provide support for a user to connect to vSphere 5.5 and 6.0 vSphere environments. I built the stub files for vSphere Management 6.0 SDK and those in my solution presented in a separate project. Each project is based on a different class library and I have each set of files for each version of vSphere stub in different NuGet packages. However, when I select to use a vSphere 5.5 connection, it seems that internally the 6.0 files stub are used, or vice versa.

I tried to separate things out by giving the Vim25Service.dll and Vim25Service.XmlSerializers.dll files for each version of alias names (alias by default for all assemblies is "global", but I changed it to vSphere5 and vSphere6 for each version. Then at the top of each class file before all with what I'm doing:

extern alias vSphere5;

or

extern alias vSphere6

(According to what project I'm in). Then, use the using statement for each class file that interacts with vSphere using vSphere5::Vim25Api; or using vSphere6::Vim25Api; to use the files to correct/stub namespace for each version I support.

However this still doesn't seem to work, and things seem to be getting confused upwards somehow. I take a guess that internal files make calls and somehow have crossed.

Is it possible to use two stub version of vSphere together different files in the same project? How should I handle my script? I thought of just upgrading to use the version of vSphere 6 (I can always connect to vCenter 5.5 using these, but some of the properties on the object have changed, (for example some dynamic properties on AlarmObjects and other items have been removed and code breaks if I delete the references to the stub vSphere 5.5 files.) So, I want to keep two different versions and use each of them separately in the same solution, so I support vSphere 5.5 and vSphere 6.

Solved - this using wsdl.exe and just by specifying a different namespace to use in the proxy class that is generated by using the /n switch.

for example using PowerShell to build automatically, the value $VimApi and do:

WSDL.exe/n:$ VimApi...

Tags: VMware

Similar Questions

  • use two different characters in the same domain

    Hi, how to use for different fonts in the same field?

    unless "crush you" painting: you do not have.
    If you do, you can use graphics.setFont

  • Is it possible to use two different computers with the same adobe - ID and the same adobe license?

    Is it possible to use two different computers with the same adobe - ID and the same adobe license?

    Hi Morten,

    Yes, you can have your subscription or your license installed on two different computers with the same adobe id, however use one at a time.

    Please let us know if you have any questions, more about it.

  • How to use windows search to search the contents of a bunch of files with random names / extensions?

    How to use windows search to search the contents of a bunch of files with random names / extensions? Plain txt files say 1,000 with random name of file extensions?

    You can always search within those, but you need to add extensions to the file system so that it knows to look inside these files.  You said that you have a lot, so it's perhaps tedious.  Here's How to search within several types of files.

    One thing you could try is rather to make a copy of this file, rename all the files to the same extension (even an extension false for example something.bill) and perform your search on this band.  Just an idea.

  • How to use several different sections of the same clip in the timeline?

    Hey, I used this tutorial as a reference for editing. I have my own equipment I want change, which includes several takes different. Is it possible to use several different sections of the same clip in the timeline? You know, like the good part of a certain record keeping. I appreciate any assistance. Thank you

    Post edited by: Kevin Monahan

    Reason: changed the title of best research opportunities

    I prefer to put the clip in the Source monitor Panel, then set the points and exit. From there you can simply drag the section of the element in the sequence.

    Or, you can make a subelement, the section will have a distinct element in the bins in the project Panel. You should always keep the original material, but now you can have real subitems to work if you prefer.

  • I use two different versions of Firefox for two different employers - how to install the new version without losing an old?

    An employer requires that I use Firefox 3. The other requires that I use the most recent version. How to install a new version of Firefox to another path without overwriting the old version?

    The best way to have a version be an installation of Firefox Portable. The mobile facility is autonomous and will not affect your installation of Firefox "ordinary".

    http://PortableApps.com/apps/Internet/firefox_portable

    Otherwise, you will need to set up a profile specifically for version 2 and make sure the correct profile is launched in each version.

    http://support.Mozilla.com/en-us/KB/managing+profiles

    http://KB.mozillazine.org/Shortcut_to_a_specific_profile

    Overall, you are probably best to replace your current version of Firefox 3.6.25 with Portable Apps - http://portableapps.com/apps/internet/firefox_portable/localization#legacy36 - version and install Firefox 9.0.1 that your installation "regular".

  • How to run two 'County of buffered edge' using two different counters at the same time?

    Hello

    I try to use two counters at the same time count the TTL pulses for a fixed period (lets say 10 ms). I have the card PCI-6251 and PCI-6601. I am currently using PCI 6601 as counters and running a self updated the ' stamped edge County - reset.VI. Here, I have attached my VI.

    Now, during the execution of this VI, I get an error saying "error-200251 occurred at Task.vi:4 DAQmx Start" and the possible reasons are, "measures: no USB or DMA channels in loose ends are available.»

    Either stop other tasks which might be using these resources or are considering changing your mechanism for transfer of data to the interruptions if supported.

    Device: Dev2

    Task name: _unnamedTask<80>. »

    What I realized is I'm trying to use two buffers for two meters with ten samples each and this is probably not allowed. I don't know how to solve this out and bad looking for your suggestions.

    Thanks in advance.

    Hi all

    I found a solution too. This is the VI updated the "County of edge stamped" which can simultaneously run two entries-meter using a single source of door and it also uses the DMA and interrupts to save two pads.

    Have a nice weekend.

  • How do I use a different version of the BlackBerry JDE?

    Hello

    I installed BlackBerry JDE version 4.5 to 6.0.

    How can I find out the current version used to Eclipse?

    I also try to change using the JDE follosing version this article, http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800901/How_To_-_Confi...

    But there is no such ide.bat under the directory.

    Thank you.

    Under your project directory, there is a JRE System Library. Right-click on it and select Properties. After that, I think you know what to do.

    I hope this helps.

  • How Brussels a printer on a home network using two different versions of windows/XP and 7?

    I am using an HP printer installed on my home network and my Windows XP with my new Windows7/64 bit. Windows XP is 32-bit.

    Someone at - it the key?     Jack

    Hello

    If your network contains computers running different versions of Windows, put all computers in the same workgroup.

    I suggest you to refer the steps mentioned from the link, this could help you share the printer on the network.

    http://Windows.Microsoft.com/en-in/Windows/sharing-files-printers-help#sharing-files-and-printers=Windows-XP&V1H=win8tab1&V2H=win7tab5&V3H=winvistatab1&v4h=winxptab4

    Additional information:

    http://Windows.Microsoft.com/en-in/Windows7/networking-home-computers-running-different-versions-of-Windows

    For all windows questions do not hesitate to contact us and we will be happy to help you.

  • How to consolidate the two different versions of the same album on a Walkman?

    I have two files "Worlds Torn Asunder" and "Worlds Torn Asunder [+ Digital Booklet] the first to 8 of the 10 songs while the latter contains the other two. When I open my list on the player, I have an option for each file and cannot read the album in its entirety in a single race because of this. I tried to copy and paste the two DB Edition to the standard edition, but the player just puts copies in the DB folder, even if they are in the standard folder on my computer.

    (Sorry for posting in the wrong section, but I cannot click on the options available in the menu "show all".)

    Hello Christopher,

    Welcome to the community of Sony.

    Try to copy the files on your computer and remove the Walkman player. After that, create a unique folder with all 10 songs on your computer. Connect the Walkman player to your computer and transfer the new folder with all 10 songs. Check if this workaround works.

    If my post answered your question, please mark it as an "accepted Solution".

  • Can I use a different version of the Windows driver to install my scanner?

    I have an abandoned scanner which has drivers that are compatible with Windows Vista, 2000, ME and 98. I have Windows 7 Home Edition on my new computer and that you need to load the driver for my scanner Visioneer 9320. Can I use one of the above drivers or do I need to get a new scanner? Thank you.

    Wednesday, October 3, 2012 16:02:52 + 0000, Jennifer S_844 wrote:

    I have an abandoned scanner which has drivers that are compatible with Windows Vista, 2000, ME and 98. I have Windows 7 Home Edition on my new computer and that you need to load the driver for my scanner Visioneer 9320. Can I use one of the above drivers or do I need to get a new scanner? Thank you.

    You can try the Vista driver. It might work. Others will not.

    Ken Blake, Microsoft MVP

  • How to open two different images at the same time to work on it together please?

    Please help, I am at a loss to open the two images at the same time to work together on them. can someone help please

    I suspect that, in this point of you familiar with the functionality of Photoshop, you may prefer the following:

    Choose Preferences > Interface > and uncheck open as tabs Documents

    Then, when you open two images they both will appear on the screen.

    At a later time, you may want to work with her alternate: the tabs option.

  • How to use "Routing Table" option in the Proxy in OSB service?

    Hello

    I created business services and Proxy in my console of OSB. I used the "Custom Query" option when creating the database adapter and I am passing a parameter to the query. My input parameter is 'name '.

    Based on the input for this parameter values, I spend a values corresponding to the query. By example, if I pass the following values to the input parameter "Name" (India) I need to spend "Value1" to my request.

    The India-> value1
    China-> value2
    America-> value3

    To achieve this requirement, I used option "Routing Table". I specified the values as follows: -.

    Expression - $body / fet:FetchCustDataInput / fet:Name
    Operator - '='
    Compare the value - India
    Service - "my Webservice.
    Operaton-"my Service operation.

    In the "application of Actions:" I added the 'add an Action-> processing e-mail-> replace' and provided the following values.

    Replace < XPath > = $body / fet:FetchCustDataInput / fet:Name
    Variable = 'name '.
    with the Expression = xs:string('Value1')
    and the "Replace the content of the node" option selected.

    No validation error I encountered. I created the routing table in the Proxy service. But when I try to run the service proxy in my Test Console, I get the following error
    «The call resulted in an error: an unknown error during the processing of the message of service ProxyService OSBQueryService/FetchByCustomQuery/FetchByCustomQueryPS.»

    I even activated "Direct call" and 'Include Tracing' options as well. The message in "Tracing" give "(echo request)
    Routed service. No Service has been invoked, echoed the demand. ».

    Can someone please help me solve this problem.

    Thanks in advance,
    Udaya

    Hi Marion,.

    Replace = $body / fet:FetchCustDataInput / fet:Name
    Variable = 'name '.
    with the Expression = xs:string('Value1')
    and the "Replace the content of the node" option selected.

    Above replace the action is wrong. It should be like -

    Replace = $body / fet:FetchCustDataInput / fet:Name
    Variable = body
    with the Expression = xs:string('Value1')
    and the "Replace the content of the node" option selected.

    Kind regards
    Anuj

  • Use the UPD in different Versions on the same server

    Hello

    We're about to update some things on our print server (eg. name, queue) and want to upgrade the driver as well. A week to use two different versions of the UPD, at the same time on the same server.

    Is it possible or will that get us in trouble?

    I would recommend this ad in the Forums of HP Enterprise Support for better coverage, given that this may happen there anymore, it's here on the forums of consumers.

    You can access support at the following link enterprise forums.

    http://h30499.www3.HP.com/

  • How to compare two different interfaces without creating different versions?

    I know that if we create two different versions of the same interface, so we can compare the two versions. But is it possible to compare two similar interfaces to each other, created in different folders?

    Hi 2782749,

    Not sure if it works with 11g, but possible in 12 c. In the main menu, click on ODI-> browser Version.

    Click on both interfaces, and then click Compare in the upper right corner of the browser Version.

    You can also export and a tool of comparison on the xml files to highlight the differences. The result will be about the same.

    Comparison tools:

    Windows: Compare plugin for Notepad ++

    UNIX: diff

    It will be useful.

    Kind regards

    JeromeFr

    [edited after realizing that a comparison even works with various items].

Maybe you are looking for

  • Windows vista ultamite verses windows 7 rc

    I have two laptops.both under windows vista professional, I was download disc.i gunna want to appolize.it was my fault.i need to trial and error.guy thing... ok now vista windows is better for me? I have aGateway Tablet running winxp / the error of t

  • Deleted TUNMP. SYS and need to reinstall it.

    A few days ago my computer started having problems to download (very slow) emails and also a program file is 650 MB and it yielded to about 7 to 9 kps.  I went into the Device Manager and found a yellow exclamation mark under network adapters. Map Mi

  • Backup for windows vista, it counts 22 dvd - are up to 7 hours.

    My backup for Windows Vista Home Premium takes 7 more hours and is not yet complete.  I'm also up to 22 dvd - r.  Can someone tell me what I'm doing wronge?

  • Do not add the Volume button to Reconfigure VRA 7 VM

    HelloI try to give volume to my virtual machine using action reconfigure. But I can't see the volume button in the storage tab.Can I change CPU/memory/network. I can also change the first size of HARD drive (but I wasn't looking for it).This is norma

  • FULL creative cloud - received TRIAL membership

    I bought FULL creative cloud - a membership I have Download Premiere PRO no problems, but when I download After Effects I received the EVALUATION VERSION with only 26 days to go.What should I do?