Toolbox doubled items issue caused by SL5 Tools and RIA 1.0 SP2

The Issue

After installing Silverlight 5 Tools for Visual Studio 2010 or just the RIA Services 1.0 SP2, Visual Studio 2010 starts to add duplicates of third-party controls to the toolbox after each restart/reset of the toolbox. After some time what we have is a huge list of controls in each tab and the toolbox is loading very slowly. The issue has been described in Microsoft Connect as well:

http://connect.microsoft.com/VisualStudio/feedback/details/551183/loading-toolbox-content-from-package-takes-55-seconds-or-more

 

The Fix

If you are already experiencing this issue, you are aware of it and you are  looking for a fast fix to try, I will not waste your time anymore and will get right to the point.. Download the attached .zip, extract its contents, close Visual Studio 2010 and run the extracted .bat file. Start Visual Studio, load any project, open a file in design mode and look at the toolbox. Repeat this sequence several times and observe if the issue is fixed.

 

What it actually does?

Well, it is really quite simple. It just removes a corrupted RIA services toolbox cache registry entry and your local “.tbd” files.

 

What causes the issue?

It is very common issue after installing Silverlight 5 Tools for Visual Studio 2010 or just the RIA Services 1.0 SP2 update. For some reason it results in corrupting a Silverlight 4 RIA toolbox cache registry key located here:

 

[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\ToolboxControlsInstaller_AssemblyFoldersExCache\HKEY_LOCAL_MACHINE_Software_Microsoft_Microsoft SDKs_Silverlight_v4.0_AssemblyFoldersEx_Ria Services v1.0 Silverlight Libraries]

Visual Studio is trying to load the corrupted cache, which results in an error. Then, it tries to rebuild the cache resulting in another error which prevents it from cleaning its previous visual state cache.

For more information on how Visual Studio toolbox works check this post:

http://community.infragistics.com/blogs/alexander_vezenkov/archive/2012/05/02/how-visual-studio-2010-toolbox-works.aspx

 

 


Add a Comment

Be the first one to add a comment. Please Login or Register to add comment.