The next version of Visual Studio .NET (whidbey) has some extra added functionality or templates to give you a head start on building internet / intranet applications. Currently, you can only create a web application using the Web Application template under Visual Basic project or C# project. Did you ever wonder that you could have your own template as a startup for any applications you build. Thats where the interesting concept of Project templates come into picture. In this article I will explain what actions are being taken when you create a Visual Basic application for Web. I will also give a small example of building your own template.
So, lets see what exactly Visual Studio does during creating a new application. When you open Visual Studio .NET and create a new application you are presented with the New Project dialog box. The project dialog box has templates for Visual Basic.
Once you type in the project name Visual Studio normally does the following steps-
1. Creates a solution.
2.Adds project to the solution.
3. Adds all the inital files to your project. For example, for Web Application it will add WebForm1.aspx, global.asax, Web.config and Style.css file.
So, it would be interesting to know from where does Microsoft get these files. For this we will have to look at how the folder structure is for Visual Studio .NET 2003. If you have used the default settings when installing Visual Studio .NET 2003 then you can find the folders under Program Files. The folder structure for VB 7 is as follows -
For each Language there are separate folders. For example, Visual Basic has its own folder called VB7, C# - VC# and so on. For this article purpose, we are going to consider Visual Basic.NET only.The particular folders we need are vbProjects and vbWizards.