Ver versión en español    
 
Home
10 Reasons to use MZ-Tools
MZ-Tools 6.0 for VS.NET
Editions
Features
Online Documentation
MZ-Tools SDK
Download
Purchase
Version History (RSS)  
FAQ & Support
MZ-Tools 3.0 for VB6 & VBA
Features
Online Documentation
Download (freeware)
Donations (Paypal)
Version History (RSS)  
FAQ & Support
User Reviews
Community Place
Contact  
For Add-In Developers
About
   
 
User Testimonials

I'm an avid supporter of MZ-Tools. It's a product I couldn't do without and your level of support is outstanding.

Jan Hyde (Visual Basic MVP)

You will soon wonder how you ever lived without it.

Andy Maggs

More user reviews
 
HOWTO: Changing the source code of templates used by Visual Studio .NET wizards

Author: Carlos J. Quintero (Microsoft MVP) Applies to: Microsoft Visual Studio .NET 2002
Date: July 2004   Microsoft Visual Studio .NET 2003
       
Introduction

Sometimes you may want to change the source code of the templates used by Visual Studio .NET when you invoke them, for example the several templates that appear in the Add New Item dialog of Visual Studio .NET or the templates used by Visual Studio .NET Add-In Wizards. You may also want to change the default references that are added to each project kind.

More Information

To do this, you must locate the templates files in your Visual Studio .NET folders. Here you have the most usual folders for Visual Basic .NET and C# project templates (assuming a default English installation of Visual Studio .NET version 2003):

  • VB.NET templates:

The root folder for templates is C:\Program Files\Microsoft Visual Studio .NET 2003\Vb7\VBWizards.

Inside this folder, you must select the subfolder which matches the item kind that you are interested in (for example, WindowsApplication) and inside it you have the Templates\1033 folder which contains the templates used by this kind of item (for example, the WindowsApplication.vbproj, AssemblyInfo.vb and Form.vb templates).

For add-in projects, the folder for the templates is C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\Extensibility Projects\VBasic. Inside it, you have the Project1.vbproj, AssemblyInfo.vb and Connect.vb templates.

  • C# templates:

The root folder for templates is C:\Program Files\Microsoft Visual Studio .NET 2003\VC#\VC#Wizards.

Inside this folder, you must select the subfolder which matches the item kind that you are interested in (for example, CSharpAddWinFormWiz) and inside it you have the Templates\1033 folder which contains the templates used by this kind of item (for example, the NewWinForm.cs template).

For add-in projects, the folder for the templates is C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\Extensibility Projects\CSharp. Inside it, you have the Project1.csproj, AssemblyInfo.cs and Connect.cs templates.

Remarks

  • Before modifying the templates it is recommended to make a backup copy.  

Go back to the 'Resources for Visual Studio .NET extensibility' section for more articles like this

MZ-Tools 6.0 for Visual Studio .NET

You can code, design, locate code and document your apps much faster using VB.NET, C#, C++ or Visual J#:

Buy MZ-Tools Now Download MZ-Tools Demo

   Top