Click here to Skip to main content
15,860,972 members
Articles / Programming Languages / XML

Addin Manager for VS 2002-2005

Rate me:
Please Sign up or sign in to vote.
5.00/5 (16 votes)
21 Mar 2007CPOL5 min read 53K   375   46   5
Full control over addins loaded into VS2002-2005 - for power users or addin developers

Sample Image - addinmanager.png

The Tool

With AddIn Manager, you can enable/disable addins, set load options, and do the dreaded ResetAddin that, sometimes, is just necessary. Additionally, it enables you to explore all the locations where Visual Studio searches for addins.

For me, the AddIn Management in Visual Studio 2005 is broken; the Search and Load mechanism is more complex and less transparent than ever, and the advertised functionality like enabling addins, and controlling their load time often doesn't work. As SP1 doesn't seem to change that, I decided to publish this article.

This tool certainly isn't perfect (the UI is particularly horrible) but it gives back full control over your addins - whether you create them or "just" use them.

It was developed with and tested for VS 2005. It should work for VS 2002 and VS 2003 too - I played around with some stale VS2003 registry entries, too, but that doesn't count as testing, does it?

Caution: This is the result of a long night's hack and aimed at power users. While I never had any problems with it, there is certainly potential for screwing up things. You need to restart Visual Studio after making changes. Also, when Updating or uninstalling an Addin, make sure you haven't disabled it, as this would leave some stale files, and may confuse this poor little tool.

Using Addin Manager

The Dialog gives you a tree of addin search locations, each available for Current User and for Local Machine. Under each location, the actual addins are listed.

"Registry Free Search paths" are the folders you search where Visual Studio 205 looks for .vsaddin files and loads the addins automatically.

Theoretically, the Setup for an Addin just needs to copy some files there - no registry modification needed. However, since these locations are badly documented, and can be freely configured, but their current settings cannot be (legally) discovered by the setup, this doesn't work out as intended, so most addin developers still use the registry method.

Of course, the registry keys for VS 2005, 2003 and 2002 are also accessible.

Enable / Disable Addins

You can enable/disable individual addins using the checkboxes, and also some - not all - of the search paths and registry hives.

When you enable/disable an addin or a folder, it gets renamed in a way that Visual Studio will no longer recognize (but will still be there).

Note that not all checkboxes work, as I couldn't find a way to show them - only at selected items. (I guess they could be hidden by fiddling with the state image list, but that's a job for another day).

Where Is It?

You can click the "Explore" link to find the location of the selected item (addin, search path, registry key). For Registry-Free paths and addins, this will launch explorer with the given item selected.

For registry keys, this will launch regedit, and you have to select Favorites/AddIn Manager - last Explore from the regedit menu.

ResetAddIn

I don't know how to say this nicely, so I'll be blunt: sometimes, Visual Studio will forget about your addins. They are there, but they don't show up. Visual Studio has a /ResetAddin option to reset an addin specified by name - you can now do this through AddinManager.

If you have selected an Addin, you can click on one of the VS2005 / VS2003 / VS2002 links after ResetAddins. This attempts to start the respective Visual Studio version with...

/ResetAddin <your currently selected addin>

...on the command line.

Set Load Options

This is probably most useful for developers. Refer to the Visual Studio documentation for more information. I never figured out the true purpose of Set Load Options, but they seem to be important.

The Sources

This article is published under "Free tools" for a reason: the AddInManager sources aren't a shining example of good practices. So use them if you wish, but don't expect them to be of particular quality.

The tree nodes are made up by different classes implementing IAddinInfo with AddinInfoImpl as default implementation. Each node knows to enumerate its childs, and provides the enable/disable, explore, etc. operations. The implementation classes are all called AIIsomething.

The following classes are in the phlib project:

The tree logic is based on my Generic Tree in C# article. An internal Model of the data contains the AIIsomething helper objects. A Controller automatically updates the tree View when the model changes. Like in the books!

TaggedString associates a string with an Object. The Windows Forms wrapper classes for list and combo box controls are a bit disappointing. Instead of offering the standard

C#
{
    string Label;
    object Tag 
}

pattern for each item, they ask you to provide an object for each item, and use the objects ToString for the label. TaggedString holds a string and an object and overrides ToString, essentially providing the { Label, Tag } mechanism.

AIIRegistryFreeAddIn::GetAddinOptions and ::SetAddinOptions display the basic chores of modifying XML files. Either simple tasks are still painful, or XML is just not my thing.

There are also some string helper routines, which I think aren't used in the project.

Licence

The Tool in binary form is free for any use and may be redistributed without charge, as long as it remains unmodified and is attributed to the original author (e.g. by linking to this article).

Source code of the add-in itself is free for non-commercial use, please share bug fixes and improvements here.

If you find this useful, please leave a message!

To comply with Shog9s visual pleasure requirements, no ordered or unordered lists were created in writing this article.

License

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


Written By
Klippel
Germany Germany
Peter is tired of being called "Mr. Chen", even so certain individuals insist on it. No, he's not chinese.

Peter has seen lots of boxes you youngsters wouldn't even accept as calculators. He is proud of having visited the insides of a 16 Bit Machine.

In his spare time he ponders new ways of turning groceries into biohazards, or tries to coax South American officials to add some stamps to his passport.

Beyond these trivialities Peter works for Klippel[^], a small german company that wants to make mankind happier by selling them novel loudspeaker measurement equipment.


Where are you from?[^]



Please, if you are using one of my articles for anything, just leave me a comment. Seeing that this stuff is actually useful to someone is what keeps me posting and updating them.
Should you happen to not like it, tell me, too

Comments and Discussions

 
GeneralMy vote of 5 Pin
Volynsky Alex27-Nov-14 22:43
professionalVolynsky Alex27-Nov-14 22:43 
QuestionVS 2008? Pin
Seth Morris27-Apr-08 12:28
Seth Morris27-Apr-08 12:28 
AnswerRe: VS 2008? Pin
peterchen27-Apr-08 12:40
peterchen27-Apr-08 12:40 
GeneralRe: VS 2008? Pin
Seth Morris27-Apr-08 12:46
Seth Morris27-Apr-08 12:46 
GeneralCool Pin
AshMoollan27-Mar-07 14:03
AshMoollan27-Mar-07 14:03 
GeneralMessage Closed Pin
27-Nov-16 20:21
Member 1287392327-Nov-16 20:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.