Change file templates in VS.Net
If you are like me every time you create a new file in VS.Net you change the way code is arranged or laid out. Well here is a tip for you.
Change file templates: Here is how you would change your windows form file template(for C#):
- Open up <VS.NET Install Dir>\VC#\VC#Wizards\CSharpAddWinFormWiz\Templates\1033 directory
- Open NewWinForm.cs
- Make any changes to the template(NewWinForm.cs)
- Special symbols:
- For the class name use [!output SAFE_CLASS_NAME]
- For the default namespase use [!output SAFE_NAMESPACE_NAME]
- Once you are done with your changes just save the file and your done (test it when you create a new window form it should use that template)
This same idea should work for any of the file you want to change you just need to figure out the Wizard that is used to create a new file, it is usually pretty ease because they name the Wizard folders with a similar name and the file type (ie CSharpAddWinFormWiz and New Windows form). This should also work for VB just gointo the VB\VBWizards instead of VC#\VC#Wizards.
I hope this helps someone out there.