The official source of product insight from the Visual Studio Engineering Team
Like the project templates installed with Visual Studio, online project templates enable people to easily start creating various applications. It’s not just Microsoft that creates these templates -- anyone can create an online template and publish it at the Visual Studio Gallery. Once it’s published, developers can access online project templates by clicking File->New->Project in Visual Studio and then clicking “Online Templates”. This post will show you how to create an online template that has a clear purpose and that shows you what to do next after you install it. In other words, how to create a great online project template!
An Example
To get started let’s look at the online template IE8 Accelerator (CS).
Even though you may not know exactly what an IE8 accelerator is, the inclusion of a thumbnail icon + a preview image + a description help to explain the purpose of this application. The purpose was clear and it sounded useful so I decided to give it a try.
I clicked “OK” to install the template and once the download and install completed I was presented with a “Readme” welcome page to instruct me on how to get started.
Most project templates that I’ve seen create a project and leave me hanging without any idea of what to do next. But this one was different. It gave me a welcome page that told me exactly what to do next. Not only was I able to install and use the MSDN Accelerator that came with the template, I was also able to create quickly two more projects: one accelerator for Visual Studio Gallery, and another for an internal search tool that our team uses a lot. I had some suggestions for the author of the template, so I left a comment in the Discussion which you can reach from the More Info link in the New Project dialog.
The IE 8 Accelerator template is a great template because
How to create a great online project template
Here’s how you can create an online project template like IE 8 Accelerator that has a clear purpose and shows you what to do next.
using System.Speech.Synthesis; d. Add the code below into the Main method of Program.cs. (The "using" statement automatically takes care of disposing of all the resources used by the speech synthesizer when it is done.)
using System.Speech.Synthesis; d.
using (SpeechSynthesizer synth = new System.Speech.Synthesis.SpeechSynthesizer()) { synth.Speak("Hello World"); }
e. Turn up the volume and debug your project. :)
To see the online template created above look at Hello World Out Loud.
We hope these resources will be of great help to you. As always, we are happy to hear your feedback. Please comment on this blog post to do so.
Michael Leonard, Software Design Engineer in Test, Visual Studio Platform. Short Bio: Michael was responsible for testing the New Project Dialog and the Visual Studio 2010 Express editions. His passion is for smoothing the learning curve for Visual Studio users of all levels.
it really very helpful in developing project so try it......
Nice post... I do also created a sample to build VSIX using Visual Studio SDK, you can have a look into it: vsix.codeplex.com/.../59376.
One quick input: the main reason that VSI/VSIX still not been popular is it's lack of capability to show 'intro' file once the end user installs the VSIX....hope you guys will take care of it.
Hi Ashraful, In your extension.vsixmanifest file, you can specify a "Getting Started Guide" link that will launch when the user installs your extension. If there is some other functionality you were looking for, please let us know! Regards, Aaron
Aaron,
Thanks for the reply. Yes, I've seen that feature. However I think an offline support (by attaching text or html file, like shown in the above post that loads the file after adding the templated project) would make VSIX useful.
I have a .bat file that goes along with one of my templates. I have to use it to create a DLL that has win32 resources. In the bat file I need parameter substitution. After I export my template, I am having to jump through hoops to get something like 7-Zip to extract the .vstemplate file so I can modify it to set ReplaceParameters = true.
How do I do this with the vsix tool?