Wednesday, October 7, 2009

"Add Reference" Dialog Delays

Today I decided to reduce the impact of an annoying problem with Visual Studio--the length of time it takes to initially bring up the "Add Reference" dialog. It can take a minute! I run into this delay constantly because I seem to almost always need to add a reference to System.Configuration to every project. My approach was to create a custom project template with the reference already included. Here are the steps I took:
  • Navigate to "C:\program files\microsoft visual studio 9.0\common7\IDE\ProjectTemplates\CSharp\Windows\1033"
  • Copied the template ConsoleApplication.zip
  • Navigate to My Documents\Visual Studio 2008\Templates\ProjectTemplates\Visual C#
  • Pasted ConsoleApplication.zip
  • Opened up the zip with "Open with > Compressed (zipped) folders" and dragged "consoleapplication.csproj" onto the desktop
  • At line 45 added
  •     <Reference Include="System.Configuration" />
  • Saved the proj file
  • Opened up the zip with Winzip (or use 7zip) and dragged in the new version of "consoleapplication.csproj"
  • Closed winzip (or 7zip)
The new project template is ready to use!

The official documentation from Microsoft is here.

No comments: