HOW TO build your own Project Template in Visual Studio 2008
If you build a lot of websites that follow a similar structure or wish to enforce a similar structure within your team so that the code and applications are consistent and standardized, you can consider building your own Project template in Visual Studio 2008 in order to re-use. For instance, you may want the jQuery libary to be included in a JS folder for every new website that you create. Just like you see "ASP.NET Web Site" & other templates when you choose File > New option, you can have a custom Project Template show up after you create a new Project template.
The Visual Web Developer MSDN blog has detailed step by step instructions on creating a custom Project template for Visual Studio Web Developer & VSTS. I adapted the steps described there to create a Project template for VS 2008. Here are the instructions paraphrased for VS 2008:
Similarly, you can create an Item Template so that whenever you select File > New > File... or right click on a project within Solution Explorer & choose "Add New Item...", you can find a custom Item template similar to Web Form or AJAX Web Form.
The Visual Web Developer MSDN blog has detailed step by step instructions on creating a custom Project template for Visual Studio Web Developer & VSTS. I adapted the steps described there to create a Project template for VS 2008. Here are the instructions paraphrased for VS 2008:
- Open the model website based on which you wish to create newer websites.
- From the File menu, select Export Template...
- In the Export Template Wizard that appears, choose Project Template and click the Next button
- Choose a template name and specify a description for it.
- Keep the checkboxes "Automatically import the template into Visual Studio" and "Display an Explorer window on the output files folder" checked. (If you want your template to appear for all users, you should first un-check Automatically import the template into Visual Studio) and click on the Finish button of the Wizard.
- Copy the template (.zip file) alongside the other Project templates in this folder - Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplates\Web\CSharp\1033
- Select Visual Studio 2008 Command Prompt from Visual Studio Tools that appears in the Programs menu under Microsoft Visual Studio 2008.
- Run Devenv /setup at the command prompt
Similarly, you can create an Item Template so that whenever you select File > New > File... or right click on a project within Solution Explorer & choose "Add New Item...", you can find a custom Item template similar to Web Form or AJAX Web Form.
Comments
Post a Comment