Friday, March 23, 2012

Create Visual Studio 11 Template

Recently I have a task to write a template. The task seems easy but turns out very consuming. It involves little programming, but manual mouse click steps.

Because I cannot find VS SDK 2011, so I have to use VS 2011 SP1 SDK. Follow the following screenshoot, you can create a VSIX project:

This will give us the VSIX project. The content is actually from Visual Studio 11's export feature:

The export template provides a .zip file. Copy this .zip file to the VSIX project. The UI is pretty straightforward, the only problem is the VSIX is only generated for Visual Studio 2010. The way to make the VSIX work for 2010 is to make sure the Visual studio version set to 11.0 in the source.extension.vsixmanifest file. You might have to use notepad to edit the content of the file.

< SupportedProducts >
      < VisualStudio Version="11.0" >

If you ever decide to modify the zip file, please make sure you go to Visual Studio UI remove the content and re-add the content. I have been bitten this badly. :-(

No comments: