Optimizing VS.Net

In my quest for the zen-est VS.Net development I can get, I've started tweaking the project templates that come with the default install:

For starters, Project default Imports are bad. These are typically found here by right clicking the Project in the Project Explorer windows, and clicking Properties. Under Common Properties > Imports, there is a default list of Imports. I delete all but Microsoft.VisualBasic. This forces me to Add Imports statements to every source file I create. This is good, because you know where everyhting is refereced from right in your source files, not some hiddedn project settings.

This then requires a few Import Statement to ALWAYS be added to certain types of files. For example, AssemblyInfo files will now have to have "Imports System" added every time you create a new project. I knew these were probably just some template files on disk somewhere and started doing some investigative work. Viola' ! They are located here:

C:\Program Files\Microsoft Visual Studio

So I just crank up notepad (metapad, actually, it rocks hard) and edit:

C:\Program Files\Microsoft Visual Studio

To add the "Imports System" statement at the top
I also modified all the other templates, including

C:\Program Files\Microsoft Visual Studio

I changed the section that looked like:

<import namespace = "Microsoft.VisualBasic">
<import namespace = "System">
<import namespace = "System.Collections">
<import namespace = "System.Data">
<import namespace = "System.Drawing">
<import namespace = "System.Diagnostics">
<import namespace = "System.Windows.Forms">

To look like:

<import namespace = "Microsoft.VisualBasic">

Then I modified all the .vb template files to add in the proper imports statements.


Popular Posts