[In addition to blogging, I am now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu (@scottgu is my twitter name)]

This is the twelfth in a series of blog posts I’m doing on the upcoming VS 2010 and .NET 4 release.  Today’s post covers a small, but nice, change coming with VS 2010 – an “Add Reference” dialog that loads fast.

Add Reference Dialog in VS 2008

The slow performance of the “Add Reference” dialog in previous releases of Visual Studio has been a common complaint that many a developer (including yours truly) has ranted about.

Previous releases of VS opened the “Add Reference” dialog on the “.NET” tab by default – and when that tab was loaded VS would synchronously scan the global assembly cache (GAC) retrieving .NET assembly information.  Because the GAC scan was done on the UI thread, it would freeze the IDE until the scan completed – which meant that you couldn’t cancel the operation, even if you didn’t want to use that tab. 

Because GAC scans can often take awhile (if you have lots of assemblies installed and/or a slow hard drive), you could end up having to wait a really long time for the dialog to respond.

Add Reference Dialog in VS 2010

The Beta2 release of VS 2010 introduces a few welcome changes to the “Add Reference” dialog behavior that significantly improves its performance. 

The first improvement is that the “Add Reference” dialog in VS 2010 now defaults to opening on the “Projects” tab instead of the .NET tab.  This means that the dialog always loads really fast.  If you want to setup a project-to-project reference, or browse the file-system to select a file assembly, etc. you can now select these tabs immediately without having to wait for anything to load.

image

The second improvement is that the .NET and COM tabs now load asynchronously and do not block the UI thread while their lists are populated.  This means that if you accidentally click the tabs you are no longer blocked waiting for them to synchronously load – with VS 2010 you can now either click “Cancel” to close the dialog or click on another tab instead.

image

Hope this helps,

Scott