This is a mirror of official site: http://jasper-net.blogspot.com/

Customization of Project and Item Templates in Visual Studio

| Wednesday, May 4, 2011
Introduction

This article explains how to customize the project and item templates in Visual Studio. The article comes in three parts. The first part explains how to customize project templates. The second part explains how to customize item templates, and the third part explains how to create text template generators for project items.

Though there are different project types of templates available in Visual Studio for different scenarios, a lot of initial designing and coding is common and has to be done for every project. To make work easier, Visual Studio provides features for customizing the project and item templates for different scenarios.

Using the code

First, we have to create a new project template.

I am creating a new project template for an ASP.NET Web Application, and adding custom parameters to be accepted from the user which will be updated in the project files at the time of creation of the project.

The following are the steps to create a new project template:

Create a new ASP.NET Web Application and name it MyWebTemplate.
Add a new folder named Views in the project.
Add a new .aspx page in the Views folder and name it ViewPage.aspx.
Add a custom parameter named $Title$ in the ViewPage.aspx file.

Read more: Codeproject

Posted via email from Jasper-net

0 comments: