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:
So I just crank up notepad (metapad, actually, it rocks hard) and edit:
To add the "Imports System" statement at the top
I also modified all the other templates, including
I changed the section that looked like:
Then I modified all the .vb template files to add in the proper imports statements.
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
.NET\Vb7\VBWizards\AssemblyInfo\Templates
So I just crank up notepad (metapad, actually, it rocks hard) and edit:
C:\Program Files\Microsoft Visual Studio
.NET\Vb7\VBWizards\AssemblyInfo\Templates\1033\AssemblyInfo.vb
To add the "Imports System" statement at the top
I also modified all the other templates, including
C:\Program Files\Microsoft Visual Studio
.NET\Vb7\VBWizards\WindowsApplication\Templates\1033\WindowsApplication.vbproj
I changed the section that looked like:
<imports>
<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">
</imports>
To look like:
<imports>
<import namespace = "Microsoft.VisualBasic">
</imports>
Then I modified all the .vb template files to add in the proper imports statements.
Comments
Post a Comment
If you are asking me a question via comments, please be patient.