This project is a command-line utility designed for .NET component developers. With it, you can add or remove controls to a toolbox tab inside of Visual Studio 2005 or Visual Studio 2008, for both desktop and mobile device projects of any kind.
Version 1.0 of this project has been in production use since April 2006; a newer version is under development to add support for VS2008. This utility was originally developed by Jon Person
with additional support by Bill Bither of Atalasoft
. Special thanks to Chetan Chudasama for his original blog post
about this approach.
How It Works
This utility will create an instance of the Visual Studio IDE using COM. Then, it will open a project template in order to gain access to the toolbox for a specific device platform. Remember, Visual Studio maintains a separate toolbox for desktop projects, PocketPC projects, Smartphone projects, and etc. Finally, the utility will search toolbox tabs and modify them as necessary to add or remove controls. Since this approach triggers a silent launch of devenv.exe
it requires several seconds to warm up. However, the utility is designed to recycle instances of the IDE as much as possible to optimize performance and reduce memory use.
The Visual Studio Toolbox Manager is designed to be executed from the command line, making the utility useful during Windows Installer Packages. To use this utility, make a call to TOOLBOX.EXE
with one or more of the following switches:TOOLBOX.EXE [/vs2005] [/vs2008] [/silent] [command [...]]/silent
Causes the utility to run without any user interface./vs2005
Causes the utility to make changes to the Visual Studio 2005 toolbox if it is installed./vs2008
Causes the utility to make changes to the Visual Studio 2008 toolbox if it is installed./installdesktop assembly tabname
Installs all of the user controls in the specified assembly to a new toolbox tab with the specified name./installpocketpc assembly tabname
Installs all of the user controls in the specified assembly to the Compact Framework toolbox using the specified toolbox tab name./installcustom assembly tabname
Installs all of the user controls in the specified assembly to a custom project template (usually some mobile device platform) using the specified toolbox tab name.tabname
Represents the title text used to label a toolbox tab.assembly
Represents the path and filename of a .NET assembly containing one or more user controls to install.
Installing User Controls
This example will install controls into both Visual Studio 2005 and Visual Studio 2008 under a tab named "GPS" for desktop applications.Toolbox.exe /vs2005 /vs2008 /installdesktop GeoFramework.Gps.dll "Global Positioning System"
This example will install controls into both Visual Studio 2005 and Visual Studio 2008 under a tab named "GPS" for Compact Framework applications.Toolbox.exe /vs2005 /vs2008 /installpocketpc GeoFramework.Gps.dll "Global Positioning System"
This example will use a custom project template to install controls targeting the Smartphone 2003 mobile device platform.Toolbox.exe /vs2005 /vs2008 /installcustom "Smartphone2003-WindowsApplication.zip" GeoFramework.Gps.PocketPC.dll "Global Positioning System"
This example will remove all of the controls installed under the "Global Positioning System" toolbox tab for both Visual Studio 2005 and Visual Studio 2008.Toolbox.exe /vs2005 /vs2008 /uninstall "Global Positioning System"
This example will perform an installation of an assembly to the Visual Studio 2005 toolbox, but no user interface will be displayed.Toolbox.exe /vs2005 /silent /installdesktop GeoFramework.Gps.dll "Global Positioning System"