Why won't Microsoft use the registry to manage the toolbox?

Coordinator
Jan 24, 2008 at 7:04 AM
The Headache of Installing Controls

I've been developing .NET components since 2003, and it's been amazing to see all of the improvements made to Visual Studio over the years. I'm thankful for the minimum of grey hairs I have now after spending days to figure things out such as design-time vs. run-time assemblies in Visual Studio 2003. It's a small price to pay compared to the vast number of innovations brought into each new edition of Visual Studio.

But one particular area of Visual Studio seems to me like it could use some improvement. Currently, installing one or more user controls into a toolbox requires a rather complicated task, IMO. Using the Visual Studio SDK to create custom packages is okay I suppose, though it didn't seem to run reliably for me or my customers when I played around with it. The toolbox utility (introduced here) is an attempt to smoothen out the install process for component vendors, bt this still is a rather messy solution, using COM and instances of devenv.exe to get the job done.

How About Registry-Based Toolbox Configuration

I could be overlooking some critical details, but it seems to me that the registry would be an ideal place to use for adding or removing items from the Visual Studio toolbox. Consider this registry branch:

HKLM/Software/Microsoft/VisualStudio/9.0

... you can see packages which have been installed, but not individual user controls. This is what I think is missing. If this branch were to be organized a bit differently, adding and removing toolbox items would be as simple as creating and removing registry entries, and the entire process would be a lot simpler for everybody.

So, I'd like to propose this:

HKLM/Software/Microsoft/VisualStudio/9.0/Toolbox/ProjectTemplate/TabName/Assembly

ProjectTemplate would be a string value matching the project template used to access a particular toolbox (desktop, PocketPC 2003, Smartphone, WM5, WM6, etc.).
TabName would be a string indicating the name of a tab to include in the Toolbox.
Assembly would be a fully-qualified assembly path, version, public key to help VS find toolbox items.

... with this approach, my installer needs only to create a few registry keys, then remove them during uninstall, which I think is nice and clean. Thoughts?