Search
Saturday, July 31, 2010 ..:: Blogs ::..   Login


Search Blog
 Most Recent Blogs - see full blog on Blog page Minimize

Jul 13

Written by: Eric Bell
7/13/2009 2:21 PM 

If you need different template code from Visual Studio, here's how.

When you add an item through Visual Studio 2008, a template generates the default code. Web pages, WinForms, classes, workflow, reports - all of them. For instance, a webpage by default uses a DOCTYPE of XHTML 1.0 Transistional and this may not be what you want. To change the default web page, change the template file and regenerate the template file cache.

1. Modify the visual studio template file. The path for VS 2008 is:

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\Web\VisualBasic\1033\WebForm.zip.

Unzip the webform.zip and modify these two file “WebForm.aspx and WebForm_cb.aspx”.

Simply change the DocType.

2. After updating the visual studio template files, delete the     c:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplatesCache folder to clear out the template cache.

3. Rebuild the template cache by running Visual Studio using the following command line:
devenv /InstallVSTemplates

Tags:

  

Copyright 2006-2009 by Polymorph Corporation   Terms Of Use  Privacy Statement