Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add-ins in VS.NET 2005 Beta 2: CommandBarControls

Status
Not open for further replies.

jejox

Programmer
Aug 16, 2005
1
0
0
BE
I'm currently trying to get an Add-in to work in VS.Net 2005, beta 2. Some things work, but these things refuse, giving me undescriptive COM errors.

* Adding Separator lines & Comboboxes to a menu/toolbar. The separator line wont even add. The combobox adds nicely (CommandbarComboBox), but all of the methods to add items to it (AddItem(), ...) generate COM-Exceptions

* Adding popup menu's to existing menu's. Adding one is no problem, but adding items to it doesn't work

* Anyone knows how to programmatically select items in the Solution Explorer.


Any help on this will be appreciated very much!

Some pointers I noticed:

1. The code generated by the add-in wizard doesn't work. You have te create your own code that checks wether tour buttons and commands already exist or not. Adding them twice ain't possible

2. Hooking onto events from the DTE is tricy. Keep a reference to it, because getting a reference to the DTE2 object merely gives you a copy of the original object, making the GC collect it when it goes out of scope (the method that hooks on your eventhandlers). Keep a reference to it, or your events wont be called (or once).

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top