简体   繁体   中英

Visual Studio 2008 Addin to add a menu item in Project Popup menu

I am trying to create a Addin for Visual Studio 2008 IDE. First step in that is to add a menu item in the Project Context menu in the Project Explorer (where I want to add a menu item named "Add My Reference" along with "Add Reference" and "Add Web Reference" menus)

I am able to add the a menu item to Main menu Project Commandbar but not the context menu in project Explorer.

Can anyone help me out with this?

There are 2 parts to my answer.

Firstly I'd suggest that you look into using the DXCore

The DXCore is the framework on which CodeRush Xpress, CodeRush and RefactorPro are built. This should serve to underscore it's credability.

The DXCore however is completely Free to download and use (Like CodeRush Xpress) with no payment nessecary

The reason I suggest this framework, is because it abstracts a great deal of the complexities of Studio addin creation away without removing access to the DTE, should you need it.

How does this help you Using this framework, you can simply drag an action component onto your plugin's design surface and set a few properties in order to have a menu item popup on the Project context menu. See this blogpost to learn about actions . This one follows up with how to build a simple plugin .

Secondly I'd like to indicate a plugin I have previously written, which whilst not identical to that which you are doing, seems to both come close and perhaps provide a good example of what can be achieved with the DXCore.

The Example I have in mind is called QuickAddReference and is described here

Also note that all the source is provided free and that there are several other plugins all based around the DXCore and providing a wealth of other facilities

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM