Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Attaching to Specific Instances of the IDE

Visual Studio add-ins are deprecated in Visual Studio 2013. You should upgrade your add-ins to VSPackage extensions. For more information about upgrading, see How to: Convert an Add-in to a VSPackage.

There are two ways to attach to a specific instance of the Visual Studio integrated development environment (IDE) when multiple instances are running.

Both of these methods use monikers. A moniker is a name that is bound to an object — in this case, the IDE — that can be used to locate, activate, and access the bound object. You do not need specific information about the location of the actual object. In this regard, it works like a shortcut does with a program in Windows.

There are two ways to attach to a specific instance of the IDE:

  • Use the solution file path moniker.

  • Use the item moniker.

If the instance of the Visual Studio IDE to which you want to attach has an open solution, then you can attach to it by using the solution file path moniker. That file moniker is registered in the running object table (ROT) with the solution object for that file. Use Solution.DTE to get to that object.

Visual Studio also registers a ProgID as an item moniker in the ROT. The ProgID is comprised of the name and process ID of the DTE process. So, for example, the object's ROT entry might be "!VisualStudio.DTE.10.0:1234," where 1234 is the process ID.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.