We recommend using Visual Studio 2017

Side-By-Side Automation Compatibility Issues

When running Visual Studio .NET 2002 and Visual Studio .NET 2003 side-by-side (SxS), there are some compatibility issues to be aware of.

  • Visual Studio .NET 2003 registers (in devenvCP.rgs) both the version-independent ProgID for the Solution and DTE classes, as well as new, version-dependent ProgIDs for the same classes. The version-independent ProgIDs are set to point (using the CurVer key) to the Visual Studio .NET 2003 version-dependant ProgIDs, namely, VisualStudio.Solution.7.1 and VisualStudio.DTE.7.1.

    This means that any call to CoCreateInstance that relies on the version-independent ProgID will create an instance of Visual Studio .NET 2003, whether Visual Studio .NET 2002 is installed on the system or not.

  • Visual Studio .NET 2003 also installs mappings from VisualStudio.DTE.7.1 and VisualStudio.Solution.7.1 to the ClsID of the Visual Studio .NET 2003 IDE. To create instances of Visual Studio .NET 2003, you must use CLSIDFromProgID and call CoCreateInstance on the returned ClsID.
  • To accommodate SxS operation between Visual Studio .NET 2002 and Visual Studio .NET 2003, new instantiations of the IDE (devenv.exe) require a version-dependent progID. This means that to create a new instance of Visual Studio .NET in Visual Basic .NET 2003 or Visual C# .NET 2003, you should now call CreateObject rather than EnvDTE.DTE. For example, instead of using
    new Microsoft.VisualStudio.EnvDTE.DTE()

    You should now instead use

    inst = Microsoft.VisualBasic.Interaction.CreateObject _

    If you are porting an application from Visual Studio .NET 2002, you will need to make this change in the code, if applicable.

See Also

Add-In Registration | Creating Add-Ins and Wizards