Object Model Versions

The automation object model is actually defined across four different, complementary primary interop assemblies (PIAs): EnvDTE, EnvDTE80, EnvDTE90, and EnvDTE100. EnvDTE is the original automation assembly distributed with Visual Studio .NET 2003. EnvDTE80 was the library distributed with Visual Studio 2005. EnvDTE90 is distributed with Visual Studio 2008. (Yet another assembly, EnvDTE90a is installed with Visual Studio 2008 Service Pack 1.) Finally, EnvDTE100 made its first appearance with Visual Studio 2010. Each version of Visual Studio ships with the cumulative set of libraries. Starting with Visual Studio 2012, no new versions of the interop assembly have been introduced. Visual Studio 2012 and beyond ships with all four PIAs.

The reason for multiple assemblies is simple: they help balance the need for new features against the need to preserve backward compatibility. For instance, with Visual Studio 2008, Microsoft was faced with a common design decision: replace or upgrade the previous assembly shipped with Visual Studio 2005 (EnvDTE80) and risk introducing incompatibilities with current macros and add-ins, or ship a new assembly that could be leveraged when the new functionality was desired. (Existing code would still target the previous, unchanged library.)

The latter path was chosen; thus, EnvDTE100 (100 represents version 10.0) contains automation types and members that are new to Visual Studio 2010, while EnvDTE90 (for Visual Studio 2008) and EnvDTE80 (for Visual Studio 2005) provide the base level of functionality and backward compatibility.

Within the EnvDTE100 assembly, you find types that supersede their predecessors from the EnvDTE90 assembly. The same is true for types within EnvDTE90 that supersede types implemented in EnvDTE80, all the way back to the original EnvDTE assembly. In these cases, the type name has been appended with a number to indicate the revised version. Therefore, we have DTE and DTE2; Solution, Solution2, and Solution3; and so on.

Table 14.1 provides a side-by-side listing of some of the most important types implemented in the EnvDTE libraries. This type list is incomplete and should be considered for reference only. This table is useful, however, for identifying some of the newly minted types in the new automation assembly; in the next section, we see how these types can be organized into broad Visual Studio automation categories and how they map onto physical IDE constructs.

Image
Image
Image

TABLE 14.1 Partial List of Automation Types

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset