Code Project

Link Unit

Tuesday, May 19, 2009

Tip to optimize C# Refactoring in Web Projects

I usally do the refactoring of the web application code developed over period of time to make it more managable. But most of the time VS take too long that it becomes better to do refactoring on your own.Later I decided to read some blog posts to see whether someone has work on Optimising Refactor. After googling around for a while, I found the solution.

Scott has posted a great tip for speeding up refactoring performance with Web Projects in VS 2005.

Solution:

  1. Click Start->Run in Windows and run "regedit"
  2. Navigate to this registry location: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\CSharp\Options\Editor
  3. Right-click on the Editor node and choose "New DWORD value"
  4. Name the value "OpenAllVenusFilesOnRefactor" and leave the value as 0

Then, when you restart VS 2005 and perform a re-factoring - you should find performance very fast.

 

This hack basically turns off the refactoring functionality beyond the current page and so it's pretty fast. It looks like this has been fixed in Visual Studio 2008 thankfully.


Hope it Helps
Jatinder

No comments: