Friday, May 28, 2010

VS2010 and Resharper 5.0 performance - KB974417

On my current project we have upgraded our solution from VS2008 to VS2010. I'm a big user of Resharper 5.0 in VS2008 and have it also installed in VS2010.

However when the solution was loaded Resharper would completely lock up VS2010 and eventually crash. Disabling Resharper 5.0 didn't help much (phew! can't live without Resharper), but the problem still remained.

The VS2010 IDE became very unstable for our WPF and heavily resourced solution targeted at .Net 3.5. Visual Studio would regularly crash (say every 10 minutes) with an Out of Memory exception of some kind. If it didn't crash then the build would fail with some out of memory or not enough resources message.

Fortunately in the Event Viewer there was this particularly unhelpful message:

Event Type: Error
Event Source: .NET Runtime Optimization Service
Event Category: None
Event ID: 1103
Description:
.NET Runtime Optimization Service (clr_optimization_v2.0.50727_32) - Tried to start a service that wasn't the latest version of CLR Optimization service. Will shutdown

This error seems to relate to a failed or corrupted installation of KB974417 - which applies when .Net 4.0 framework is installed.

There are two ways to fix this. One or both may work for you.

The first is to manually install the update via the Geek Lab article.
The second is to remove the conflicting update and then reinstall:
  1. Uninstall update KB976569 manually through Add/Remove programs.
  2. Download KB974417 for your platform and install it.
  3. Re-install KB976569

If you don't have KB976569 installed to start with then it is possible to resolve this issue by installing KB976569 then following the steps above.

Problem solved! Enable Resharper and code away.

kick it on DotNetKicks.com Shout it

3 comments:

Anonymous said...

Thank you very much for your solution. I ran into this problem installing several Windows XP guest OS's in VM's. Thanks!

Anonymous said...

OS: Windows XP

Even though I found it via a registry search, I never did find it listed in the Add/Remove list (with "Show updates" chosen).

Instead I opened the msp file with InstEd and got the Target Product Codes and Patch Code.

Using http://bit.ly/bh438v as a guide, I used this to remove KB976569:

msiexec /package {C09FB3CD-3D0C-3F2D-899A-6A1D67F2073F} /uninstall {621253FA-14E8-34AB-82B3-22590E6A961A}

Unknown said...

Its such a nice code. Thanks for the support. I really appreciate the way you written that. iPhone iPad Application Development