For Tech Ed 2008, I gave a Chalk Talk on how to build and customize your own Visual Studio Isolated Shell product. There are several examples out there such as the World of Warcraft Add On Studio and the Iron Python Studio.
My goal for this blog post is to cover most of the topics I discussed during the chalk talk. I will be covering how to create your own shell, customize it, and add the Storyboard Designer packages to your shell.
1. Install Visual Studio
2. Install the Visual Studio SDK
3. Download the DSL package for the Storyboard Designer
Step 1 – Create your shell
This is the easiest part of the walk through. Launch Visual Studio, select New Project, choose Other Project Types, and select Extensibility. Choose the Visual Studio Isolated Project and enter a name for your shell.
After clicking next, a default shell project is created for you.
At any point during this walk through, press F5 to build the shell, launch the shell, and view the changes you made. Note – once you update the pkgdef, pkgundef, or vsct file, the shell will run the /setup command when deploying to rebuild the menus, or reregister the package. It will takes a minute or two after the compilation, depending on your machine speed and RAM.
Step 2 – Customize the UI
The pkgdef file in your shell stub allows you to customize the project name, the icon location, bitmap location, and many other properties of your shell. Go ahead and modify that file to customize your shell.
During the demo, I changed the name and the default web page.
Step 3 – Customize your menus
This is accomplished through the .VSCT file under the resources node in your Shell UI project.
Open the VSCT file and edit it. Every line you uncomment will remove that item from the menu bar in your isolated shell.
If you want to use the same sample I used at the chalk talk, open the Storyboard.VSCT.TXT file attached to this blog post and copy and paste the contents in your own VSCT file (don’t forget to remove the existing values in there).
Step 4 – Remove unnecessary packages
To remove packages you don’t want to appear, you will need to add them to the .pkgundef file.
You can find the package GUIDs in the registry under: HKLM\Software\Microsoft\AppEnv\9.0\YourProject\Packages
For each package you wish to remove, add the registry key to the pkgundef file. If you want to use the same customization from my talk, copy the contents from Storyboard.pkgundef.txt into your pkgundef file.
Step 5 – Add your own Help About box.
This is well documented here
Step 6 – Add your own packages
To add your own packages, right click on your solution and select Add -> Existing project. Navigate to your project and add them to your product. Remember to add the dependencies to your stub executable by:
– Right click on the stub.exe project
– Select Shell dependencies
– Check the packages you just added to the solution
Add the DSL and DSLPackage from the Storyboard designer project.
That’s it for customizing your own shell.
The final step is to build your own setup for your binaries.
Step 7 – Add your own templates
Grab the item templates zip file from the Storyboard Designer project and place it under %ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\General\1033
You will need to touch the pkgdef, pkgundef or vsct file to get the /setup command to run which will extract the packages and make them available at runtime.
Step 8 – Build your own setup
This is also well documented here
Step 9 – Tying things together
The final deployment piece is to tie everything together. This will require you to build your own setup chainer. You have several options here including:
– Create your own exe
– Use the Setup project bootstrapper (Paul Stubbs has a good blog post here to get you started)
– Use a third party setup project to do the chaining
You will need to chain in the VS Isolated shell first, and then chain in your own MSI you created in step 6.
That’s it. By this point, you now have a full end to end product that you can post on the Visual Studio Gallery and share with the rest of the world.