If Your Visual Studio Solutions Open Slowly, Check WebsiteCache

While tracking down an issue the other day, I stumbled across 25,000+ empty subdirectories inside a single folder: Documents and Settings\<username>\Local Settings\Application Data\Microsoft\WebsiteCache (or on Vista, Users\<username>\AppData\Local\Microsoft\WebsiteCache).  NTFS can technically handle this, but file system performance can slow down for a directory containing such a large number of subdirectories.

How did this happen?  I’ve been using the same XP workstation for BizTalk and some .NET development for one year, using Visual Studio 2005 SP1, BizTalk Server 2006 R2 and the Visual SourceSafe 2005 provider.  My BizTalk solutions include a C# web application project alongside numerous BizTalk projects.  After deleting everything in the WebsiteCache folder, I discovered that my BizTalk solutions opened noticeably faster.  Upon opening and closing the solution a few times, it turns out that Visual Studio was creating one empty subdirectory in WebsiteCache for most or all of my project files and items in Solution Items.  Each time I opened a solution around 15 new subdirectories were created, but never deleted.  Over the course of a year, I accumulated 25,000+.  Another developer found 33,000+ subdirectories in his WebsiteCache folder!

Opening the solutions was taking longer and longer as time went on.  By clearing out the WebsiteCache folder, the solutions (with VSS integration, and which contain around 12-15 projects) now open 10-15 seconds faster.

Other people have reported this issue to Microsoft Connect, but the issue was closed as “not reproducible.”

Visual Studio 2008, .NET Framework 3.5, .NET Framework 3.0 SP1, .NET Framework 2.0 SP1 RTM

The next major release of Visual Studio 2008 and the .NET Framework 3.5 have quietly been released to manufacturing over the weekend, along with .NET Framework 2.0 SP1 and .NET 3.0 SP1.  This is an important release of Visual Studio because it fully integrates the tooling for the technologies released in .NET 3.0 (Windows Communication Foundation, Windows Presentation Foundation, Windows Workflow Foundation and CardSpace) and, for the first time, can target multiple versions of the .NET Framework.

Our team has been building experience in the .NET 3.0 technologies for most of this year and playing with the betas, and we’re looking forward to working with the improved tooling in the RTM release.

Download .NET Framework 3.5 here.  The .NET 3.5 installer will install the 2.0/3.0 Framework and 2.0 SP1 and 3.0 SP1 automatically.  The service packs are also available separately for 2.0 and 3.0.  As for Visual Studio 2008, I think the MSDN subscriber downloads site is having issues already, probably due to high demand.

I just finished installing .NET Framework 3.5 RTM on my laptop running Vista Enterprise.  The install took a long time, about 30 minutes, but succeeded.  Along with 2.0 SP1 and 3.0 SP1, it also installed two Vista hotfixes, KB929300 and KB110806.  This release, like 3.0, is more of an additive release that requires and builds upon 2.0 and 3.0, unlike the 1.1 to 2.0 transition.

There is also a big new training kit (120 MB) that includes presentations, demos and labs.  You can get that here.  There are also 3.5 whitepapers by David Chappell and a 3.0 common namespaces and types poster.

I’ve been working with 3.0 and the 2008 betas for about 10 months now, so I’ve been a bit negligent with my blogging!  It has just ended up to be another really busy year.  I hope to get some new posts out about 3.0/3.5 soon.

From Microsoft:

.NET Framework 3.5 builds incrementally on the new features added in .NET Framework 3.0. For example, feature sets in Windows Workflow Foundation (WF), Windows Communication Foundation (WCF), Windows Presentation Foundation (WPF) and Windows CardSpace. In addition, .NET Framework 3.5 contains a number of new features in several technology areas which have been added as new assemblies to avoid breaking changes. They include the following:

  • Deep integration of Language Integrated Query (LINQ) and data awareness. This new feature will let you write code written in LINQ-enabled languages to filter, enumerate, and create projections of several types of SQL data, collections, XML, and DataSets by using the same syntax.
  • ASP.NET AJAX lets you create more efficient, more interactive, and highly-personalized Web experiences that work across all the most popular browsers.
  • New Web protocol support for building WCF services including AJAX, JSON, REST, POX, RSS, ATOM, and several new WS-* standards.
  • Full tooling support in Visual Studio 2008 for WF, WCF, and WPF, including the new workflow-enabled services technology.
  • New classes in .NET Framework 3.5 base class library (BCL) that address many common customer requests.