posted on Sunday, April 09, 2006 10:01 PM
by
johnwood
mscorsvw.exe and 100% CPU
If like me you've ever had mscorsvw.exe eating 100% (or a lot) of your CPU for hours or days on end, there are two options for getting rid of it.
One involves running ngen synchronously, at a higher priority one would suppose. To do this you go to the Windows\Microsoft.Net\Framework\[dotNetVersion] folder and run "ngen executeQueuedItems". For some people, including myself, this doesn't work and comes back with an error.
An alternative is to simply disable the CLR Optimization Service that is responsible for running mscorsvw.exe. The CLR Optimization Service is a new thing in .Net 2.0 that ngens (generates native binary versions of your .Net code) assemblies in the background rather than on-demand or just-in-time only (as it was in 1.1). By disabling the service you're forcing it back to the old 1.1 behavior.
To disable the service, go to Control Panel / Administrative Tools/ Services... and choose .Net Runtime Optimization Service, right click and select Stop. To permanently stop it, right click, go to Properties, under Startup Type select Disabled.
For more information on what the .Net Runtime Optimization Service does, please read this post:
http://blogs.msdn.com/davidnotario/archive/2005/04/27/412838.aspx