![]() |
Languages »
C / C++ Language »
General
Intermediate
License: The Code Project Open License (CPOL)
Addin Manager for VS 2002-2005By peterchenFull control over addins loaded into VS2002-2005 - for power users or addin developers |
C++, C# 2.0, Windows, .NET 2.0VS.NET2003, VS2005, Dev
|
|
Advanced Search Add to IE Search |
|
|
|
||||||||||||||||

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.
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.
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).
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.
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.
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.
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
{
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.
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.
| You must Sign In to use this message board. | |||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
General
News
Question
Answer
Joke
Rant
Admin
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 21 Mar 2007 Editor: Sean Ewington |
Copyright 2006 by peterchen Everything else Copyright © CodeProject, 1999-2009 Web21 | Advertise on the Code Project |