

/ /// command /// public bool IsItMycommand( string command)įinal steps are to create the methods to be run individually by each command. / /// Does this command belongs to this instance ? 3 : do we enable/disable/hide the command in the menu ? case QueryMenuVSCommandStatus.Step3_FinalState: 2: need to change command caption ? case QueryMenuVSCommandStatus.Step2_GetText:ĬommandText = cmd.Caption + " - NOT SUPPORTED" QueryMenuVSCommandStatus status = TranslateCommandState(NeededText)

*/ // translate VS command in "readable" status * - a Web or Winform application project is opened * bsupport will be set to true if when running the plugin VsCommandStatusTextWanted NeededText, ref object CommandText)īool bsupport = VStudioHelpers.IsActiveProjectSupported(VStudioApplication) / /// command name /// VS query status /// command caption /// public MenuState GetState( string command, / /// Returns information about a command to VS Action: method called when command is invoked (menu item clicked).UseOfficeResources: if yes, search BitmapResourceId in Office DLLs otherwise search bitmap in plug-in resources.BitmapResourceId: ID ( only numbers) of the BMP that will be shown in the menu.Position: order of the menu title in the menu list.HaveSeparator: does this command need a separator?.Owner: instance of the class owning the command.Name: the command name used by the system to identify a command.

Here's some explanation about the parameters: create a new plug-in project like in figure 1 (click Next until the end)!Īction = new PerformActionForVSCommandDelegate(RunCommand_New) So, this library is a compilation of practices (that work!) that I picked around and reorganized to simplify the creation of add-ins and the associated menu items/commands. Moreover, even the MS documentation wasn't clear, giving sometimes samples with different implementations for the same requirement. For older versions, people where talking about packages and pure COM calls for new ones (VS2005+), the Add-in Project template was used, and each article I read had its own implementation and limitation. So this summer, I started to dig the Visual Studio plug-in APIs (EnvDTE), and while browsing CodeProject and more generally the Web, I discovered that in fact no one has a clear and simple solution to create add-ins for Visual Studio. It has been a long time I wanted to natively integrate all our tools into Visual Studio, but due to lack of time and desire, I always thought: "OK, I'll see this later", and nothing was done.
#DO I NEED OLDER VERSIONS OF MICROSOFT VISUAL C DOWNLOAD#
