Click here to Skip to main content
15,893,663 members
Articles / Programming Languages / C#

How to Create a Visual Studio Add-in that Launches from the Project Window

Rate me:
Please Sign up or sign in to vote.
4.90/5 (3 votes)
27 Mar 2011CPOL3 min read 50.3K   744   24  
A step by step guide on how to create a Visual Studio add-in that launches from the Project window.
<?xml version="1.0"?>
<doc>
    <assembly>
        <name>MyAddin1</name>
    </assembly>
    <members>
        <member name="T:MyAddin1.Connect">
            <summary>The object for implementing an Add-in.</summary>
            <seealso class='IDTExtensibility2' />
        </member>
        <member name="M:MyAddin1.Connect.#ctor">
            <summary>Implements the constructor for the Add-in object. Place your initialization code within this method.</summary>
        </member>
        <member name="M:MyAddin1.Connect.OnConnection(System.Object,Extensibility.ext_ConnectMode,System.Object,System.Array@)">
            <summary>Implements the OnConnection method of the IDTExtensibility2 interface. Receives notification that the Add-in is being loaded.</summary>
            <param term='application'>Root object of the host application.</param>
            <param term='connectMode'>Describes how the Add-in is being loaded.</param>
            <param term='addInInst'>Object representing this Add-in.</param>
            <seealso class='IDTExtensibility2' />
        </member>
        <member name="M:MyAddin1.Connect.OnDisconnection(Extensibility.ext_DisconnectMode,System.Array@)">
            <summary>Implements the OnDisconnection method of the IDTExtensibility2 interface. Receives notification that the Add-in is being unloaded.</summary>
            <param term='disconnectMode'>Describes how the Add-in is being unloaded.</param>
            <param term='custom'>Array of parameters that are host application specific.</param>
            <seealso class='IDTExtensibility2' />
        </member>
        <member name="M:MyAddin1.Connect.OnAddInsUpdate(System.Array@)">
            <summary>Implements the OnAddInsUpdate method of the IDTExtensibility2 interface. Receives notification when the collection of Add-ins has changed.</summary>
            <param term='custom'>Array of parameters that are host application specific.</param>
            <seealso class='IDTExtensibility2' />		
        </member>
        <member name="M:MyAddin1.Connect.OnStartupComplete(System.Array@)">
            <summary>Implements the OnStartupComplete method of the IDTExtensibility2 interface. Receives notification that the host application has completed loading.</summary>
            <param term='custom'>Array of parameters that are host application specific.</param>
            <seealso class='IDTExtensibility2' />
        </member>
        <member name="M:MyAddin1.Connect.OnBeginShutdown(System.Array@)">
            <summary>Implements the OnBeginShutdown method of the IDTExtensibility2 interface. Receives notification that the host application is being unloaded.</summary>
            <param term='custom'>Array of parameters that are host application specific.</param>
            <seealso class='IDTExtensibility2' />
        </member>
        <member name="M:MyAddin1.Connect.QueryStatus(System.String,EnvDTE.vsCommandStatusTextWanted,EnvDTE.vsCommandStatus@,System.Object@)">
            <summary>Implements the QueryStatus method of the IDTCommandTarget interface. This is called when the command's availability is updated</summary>
            <param term='commandName'>The name of the command to determine state for.</param>
            <param term='neededText'>Text that is needed for the command.</param>
            <param term='status'>The state of the command in the user interface.</param>
            <param term='commandText'>Text requested by the neededText parameter.</param>
            <seealso class='Exec' />
        </member>
        <member name="M:MyAddin1.Connect.Exec(System.String,EnvDTE.vsCommandExecOption,System.Object@,System.Object@,System.Boolean@)">
            <summary>Implements the Exec method of the IDTCommandTarget interface. This is called when the command is invoked.</summary>
            <param term='commandName'>The name of the command to execute.</param>
            <param term='executeOption'>Describes how the command should be run.</param>
            <param term='varIn'>Parameters passed from the caller to the command handler.</param>
            <param term='varOut'>Parameters passed from the command handler to the caller.</param>
            <param term='handled'>Informs the caller if the command was handled or not.</param>
            <seealso class='Exec' />
        </member>
    </members>
</doc>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Product Manager Cotega.com
United States United States
John has been building cloud based services on Windows Azure since its inception. His specialty is in working with databases such as SQL Azure. John is currently working on Cotega a SQL Azure Monitoring service that provides database monitoring, alerts and reporting of SQL Azure and cloud hosted SQL Server databases.

Comments and Discussions