After installing Microsoft .NET framework in your Computer you may observe mscorsvw.exe process running in the background in the Task Manager. Some times this process consumes up to 100 percent CPU usage and slows your system down, let’s take a look at what is this process and how to disable mscorsvw.exe from running in the task manager.
Mscorsvw .exe is process related to Microsoft .NET framework. Mscorsvw process is used to precompile .Net framework assemblies in the background.
Mscorsvw.exe process runs only in the background if it needs to compile highest priority assemblies after installing .NET framework redistributable and an application using .NET framework is installed to have its assemblies compiled.
Normally precompiling high priority assemblies will be done by mscorsvw.exe process with in 5 to 10 minutes and then it will try to process low priority assemblies when your Computer is idle.
Whatever be the reason if you found mscorsvw.exe process running in task manager annoying we can shutdown mscorsvw.exe process quickly.
Disabling or stopping mscorsvw.exe
1.Navigate to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 in Windows Explorer.
2. Open the command prompt by typing cmd in run box and press enter.
3. Now we need to specify the above path in command and now type ngen.exe executequeueditems and press enter as shown below.
“C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>ngen.exe executequeueditems”
4. Now wait for the process to precompile all assemblies, after couple of minutes it will be completed.
Now you observe there will be no mscorsvw.exe process running in task manager.
| SHARE |
|
|
|
{ 75 comments… read them below or add one }
Hi Team…
It’s a wonderful tool – It helped me to overcome the issue….
Thanks a Ton..!!!!!!!!!!!!!!!!!!!!!!!!
Is there any reason why its only on certain computers and not others? Is there a way to configure it differently in the windows 7 install process or is it something related to certain hardware setups? just a bit curious as to why it needs 50% + memory and what killing the process can do in the long term.. Im gonna browse google to see what i can find but still felt like I should leave a question here as the writer of this topic seemes to know alot about mscorsvw.exe. Thanks for the info.
Thanks. Looking Work…
Thanks a bunch!
The process was running like a basketcase on our VMWare machine for capturing installation packages. This helps a lot in the cleanup operation after finishing installations!
Cheers!
I tried to this and got as far as the command prompt/
when I entered C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>ngen.exe executequeueditems
and hit enter it said access is denied
Make sure you’re doing that with admin rights.
how to have admin rights?
To repeat for the nth time:
(1) go to -> Start -> in the Search box type: cmd
(2) when a ‘cmd’ icon appears in the Menu pane, right click on it and select ‘Run as Administrator’.
(p.s. next time read all the comments before asking, the answers are all here in the comments section – just try not to be so lazy and expect others to spoon feed you the solution without reading up first. That asides, you could have Googled and found the answer to that question, easily.)
in windows explorer, navigate to the folder, while holding SHIFT down, right click in the white part in the folder and click on Open Command Window Here and then type in
ngen.exe executequeueditems
access is denied. needs an admin rights thing.
How do you specify the path? I open up the command prompt and it says C:/Documents and Settings/Administrator>
Type: cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 in command prompt. Then enter ngen.exe executequeueditems
Hi
I had a problem with 100% cpu however when I tried the fix to disable mscorsvw.exe, I received five minutes of scrolling message which generally read as follows:
System.serviceMode1, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089′ or one of its dependencies. The system
cannot find the file specified. . I also still have the 100% cpu issues.
Any Ideas?
thanks
For those with the same question as Jenny: the dialogs are expected and you should just let the command complete – whether that takes 5 minutes or an 2 hours. Every system is obviously different, so expect different response times. Configurations and other running services can also slow down the response time for the pre-compile process.
(note: if my 6 year old, ancient rig can complete the process successfully in less than 10 minutes, y’all should have it done a h3ck of alot faster than that with much newer hardware.)
Not really a big problem for me, however I noticed it after adding / upgrading .NET recently. For the heck of it, tried the suggestion of forcing system to complete open compiles using the – ngen.exe executequeueditems – suggestion proposed in original article. In my case the compile was uneventful and quick. However, the mscorsvw.exe process still sits serenely in the open processes window of task manager.
For those who KNOW they don’t require this, or are at the end of their rope: Understand that mscorsvw.exe runs as a windows service. To view all services running (or not):
– Open Control Panel > Administrative Tools > Services
– Find this entry: .NET Runtime Optimization Service v2.0.50727 _x86 (typically, the first service listed if the list is sorted alphabetically),
– double click on the gear icon next to the name to open a box with info about the service
– On the general tab, halfway down the tab you’ll see “Startup type” next to a selection box that probably says “Automatic”
– change this selection to “Manual” or “Disable”, try m anual first as this will allow any application that needs this service to start it up,
– click the “Stop” button where it says Service Status… and wait for the service to stop (or, you could simply reboot),
– if you’ve changed the start-up type, hit “save” before you close the box.
Unless you have a fair amount of experience with Windows services, don’t tinker with anything else in here.
Good Luck.
now that was the best advice I found on here! Thank you VERY much!
Thanx alot Dohjon!! You are a ruler…
you are completely brilliant!!!
i love how you are helpful without being arrogant and condescending…
speaking for those who need things broken down more simply,
thank you!!!
♥♥♥
Very helpful. One of our new test VMs was having this issue for no apparent reason.
Thanks again.
thanks alot Ventak
Kudos…It worked for me..
Thank u very much!!!
Didn’t work for me. Can’t type that word in the command prompt. Microsoft fails yet again.
LOL. “I don’t know how to work my computer so Microsoft sucks.”
Nice attitude.
Tried it, but it gets stuck at some point I guess. These are the two last lines in the ngen.log file:
1> Compiling assembly System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (CLR v4.0.30319) …
2> Compiling assembly System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (CLR v4.0.30319) …
It never says it’s completed, and even after reboot and ngen.exe executequeueditems again, it starts with these two and never goes beyond them…
Reading above, Jenny got the simular problem I guess…
Any help is appreciated.
Be aware that the process is supposed to take between 5-10 minutes to complete (he’s inaccurate to state any less) – so a little patience is called for. Don’t panic if you see the cmd prompt scrolling with warnings and error messages: it’s most likely these are internal dialogs – but not critical to the success of the ‘ngen.exe executequeueditems’ command. I used this exact process on my Windows 7 Ultimate machine using ..\v4.0.xxx\ngen.exe executequeueditems and it worked like a charm. So again, be patient (and maybe go for a cup of coffee or tea) while the process is running.
When I ran this it gave me a mesg – “Access is denied. You must have administrative credentials to perform this task. Contact your system administrator for assistance.”
I AM THE SYSTEM ADMINISTRATOR and everything else for that matter since I am the only one that logs in on this laptop (not on any net) and my login is set up as “Administrator”.
So, what am I doing wrong (or not doing that I should be?)
jim you have to open command prompt as administrator.
click start, in search bar type cmd, then right click on cmd.exe icon and click run as administrator
Thanks a bunch!
In my particular case, Win-7 64-bit, the process was STILL going for a while (after processing the command line for at least 15 minutes – I almost thought it would never complete). Afterwards, I tried to run the same command line from each of the different version .NET folders, most of which errored out because the executable did not exist except for ver 4.x.
SHORT VERSION is that I had to ALSO run the same command line from the 64-bit folder as well (C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727)
This also took another 15 mins but effectively solved my problem and the process finally disappeared. I can only imagine that it would have otherwise been a week for it to completely finish running on low priority (It seemed to want to compile something in every application folder on the hard drive)
Wrong. You’ve made some sweeping assumptions. For starters if you have installed .NET v4.X, then you should have used the latest version number (string) as your target at the command line, e.g.:
C:\WINDOWS\Microsoft.NET\Framework\v4.xxx>ngen.exe executequeueditems
(where v4.xxx is the complete version number (string) for the latest installment of .NET on your system)
What does this all amount to you ask? Well, basically ngen.exe will do some house-keeping prior to configuring (i.e. pre-compiling the assemblies):
(1) It will perform a recursive check of .NET versions installed in Windows
(2) It will parse the command line parameters to see whether they apply to the version(s) checked
(3) ngen.exe will output running dialogs on success/failure for the pre-compile process. (hint: the scrolling error & warning messages)
(4) When the correct (latest) version is reached, ngen.exe will, finally, correctly pre-compile, and then simply auto-exit to the initial, command line string, e.g. :
C:\WINDOWS\Microsoft.NET\Framework\v4.xxx (or whatever, latest version of the .NET Framework you have installed – less the ‘>ngen.exe executequeueditems’ portion of the original cmd line arguments. )
Your comments: “I can only imagine that it would have otherwise been a week for it to completely finish running on low priority (It seemed to want to compile something in every application folder on the hard drive)” are sensationalized to say the least: it took between 7-10 minutes on my 6 year old, AMD Athlon 3000+, with 1GB of RAM! (Plucking imaginary ideas and FUD out of thin air helps no-one here .. so please, for the sake of those that really need ‘accurate help’, don’t do it in future.)
Finally, i highly doubt people will encounter any disk thrashing related to .NET after this ngen.exe pre-compile process has executed successfully.
It hangs on CLR v4.0.30319, yet the CPU continues to get chewed up. This is a disaster for my laptop.
hey i have a problem with this, everytime i type this command into the console it says, that the file was not found or i typed something wrong, even tho i exactly copied the command above. I have windows 7
Thx, i ran this command, it toke 4-5 hour to finish, but finally it did what it supposed to. I updated .NET with windows update, and i thought it stucked, so i shutted it down, but this process remained. Probably it just needed some hours too.
THANKS! IT WORKED
Thank you guys 4 this tutarial .
It worked .
Thank you so much! I was about to throw the computer out the window…
Correction to the above (note the “64″ after “framework”)
SHORT VERSION is that I had to ALSO run the same command line from the 64-bit folder as well (C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727)
Typo error in his command
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>ngen.exe executequeueditems
correct command is
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ngen.exe executequeueditems
Thankyou. Was driving me nuts. I used the ‘v4.0.30319′ and all seems to be compiling ^_~
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\ngen.exe executequeueditems
I’m curious, why should the “ngen.exe executequeueditems” command be executed in the older version of the .net framework folder?
Does it make any difference if I run the command in the latest .NET 4.0 folder instead of the older 2.0 folder? For example… C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\ngen.exe executequeueditems
No it doesn’t make a difference. The command will execute correctly for the version you type in (obviously without syntax errors). I ran the command with the same version you have and it took under 10 minutes to complete – successfully, mind you.
Worked, but only when I added “cd” before the “C:/WINDOWS……” entry in cmd as stated by Dave in Jan 2011. Now computer is screaming fast, like the day I bought it.
yea yea securities and updates, all of this causing so much troubles, pls do not disturb my work with such a programs… here’s a tip TURN OF YOUR AUTOMATIC UPDATE and u will not have to face such a problems, I would say this program increases like 5% of PC performance, but the downside is that you’ll have problems with it, like eating cpu 100%…
they think that it allows to run other apps, but no! I have apps that require exactly 100% cpu, so even 1% of cpu is taken by this mscorsvw, it will disturb my app to work properly…
I keep getting WARNING: Cannot hardbind to System. Version = 2.0.0.0. Culture = neutral, blah blah blah (CLR=v2.0.50727) so I don’t know if I’m compiling the wrong version
Should I be running
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\ngen.exe executequeueditems
or
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ngen.exe executequeueditems
See my comments to Alex and Jason Tram (above). Also it’s critical you run the command line from within the correct .NET version directory – or simply ‘dir’ into the relevant directory, then run the command. If you ran the command and it begins scrolling, it’s normal to get warnings – and even errors. Relax and let the command do its thing. Whatever you do, don’t kill the process out of frustration. (If you must, kick your cat (.. or hamster) instead.)
Hey, so I went ahead and compiled the v4 one, and it finished but upon computer restart, the mscorsvw.exe came back so I’m once again running ngen.exe executequeueditems for v4.0.30319…..does that usual happen?
Thanks
If there was a capability to add screenshots, i’d walk you through it. Because my system (actually Task Manager) certainly shows no sign of mscorsvw.exe after having compiled it, since. Remember, it’s absolutely critical you run the command from within the directory. Can you try this:
(1) Go to ‘Start’ > in the search box, type: cmd
(2) In the Start list, a Command icon should appear. Right click on it and select ‘Run as Administrator’
(3) At the prompt, type:
cd C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\ngen.exe executequeueditems
(2) Once the process begins, again, let it do its thing.
I’m going to guess you did not initially open the command prompt as Administrator: because the pre-compile process only works, explicitly, for the Administrator account and no others. That might explain the failure, but without actually being able to see your system settings, i obviously can’t say either way.
There is no reason why it shouldn’t run successfully if you follow these steps exactly.
At any rate, good luck.
(1) Go to Start > in the Search box type: cmd
(2) When the cmd icon appears in the menu window, right-click on it and select ‘Run as Administrator’
(3) Type the following at the prompt:
cd C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\ngen.exe executequeueditems
Let the pre-compile process complete.
(I’d be surprised if you have any problems after following these steps – if there is, you have to be doing something completely wrong.)
Thanks a lot! Problem solved, there was a mscorsvw.exe that never disappeared, and it took me a while to figure out that there were two framework folders (framework and framework x64) and I compiled both
that, or I didn’t run as admin >>> but thank you very much!
It take a lot of time to compile!!!
I don’t like Windows, it’s a stupid OS.
Positively, thanks very much Venkat for your tips, it works fine:
Click on “start” button (Windows XP), following on “Run”, and write this command line:
c:\windows\microsoft.net\framework\v2.0.50727\ngen.exe executequeueditems
and for:
c:\windows\microsoft.net\framework\v4.0.30319\\ngen.exe executequeueditems
It works like a charm.
It worked. Thanks!
I just ran “C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>ngen.exe executequeueditems”.
And it worked, thanks! I do not need to run for v4.0.30319.
Btw.. you might want to rephrase “couple of minutes” because it ran like 20 minues. I almost thought it never ends.
Thanks yaar it worked
Thanks, that helped.
I honestly think this is seriously fucked up that solutions are this are needed anyways. If MS wants to compile their CLR crap in the background to squeeze some performance out, sure… why not? But why has it to be _that_ noticeable, that people start thinking something is wrong with their machines, and finally ending up here?
Thank you!
Tanxx a lott…that dam mscorsvw was drivin me nuts caus it slowed down my comp to a snailes pace… now its super fast
Thanks to ***Dohjon February 1, 2011 at 1:41 pm***. I have window 7 and tried the instruction above but it did not work. I followed Dohjon by disabling it in Control Panel. I knew there was something running in the background but couldn’t figured out what it was until Norton alerted me. Now it is fixed. Thanks!!
this doesnt work on windows 7 64 bit, the command works, it compiles its stuff, says its done, but the processes remain (32 bit and 64 bit).
doesnt surprise me tho, its been a trend at microsoft: load all junk in memory just in case, so the OS seems faster, even if we slow down the rest.
Worked perfectly, thanks!
I have got this problem only for a few seconds when I was trying to update Windows7.
Otherwise, the process use only 0% of CPu and 3Mb of RAM.
I have got a new computer with an Intel I7-3610QM. This is a powerful CPU. Maybe this is the same problem I had with my Old Intel Centrino duo: System (a process) was using a lot of CPU (sometimes 80%) and I bought a new PC. Windows 7 was not designed for that PC. Or this problem appears only with Windows 7 32 Bit. (See Maikel Post).
Sorry for my bad English!
It is time to say : “Microsoft must die… again”
It is ridiculous that 10 year old computers works at least twice faster than modern multicore CPUs that use that stupidest .NET technology.
Why not to compile ONCE, to native code ?!!!
Why that stupidest, monstrous .NET exist ???
Compete with Java? Java works on any platform that is why it need JIT compilation, but why Microsoft? Anyway it is compatible only inside itself…
Why slowdown computers, use much more energy ??? Reason??? Compete with Java? It couldn’t !!! I even cant imagine if it monster would works on cell phones and eat up all battery by “optimizing .NET”
I didnt scream never “MS must die…” even in DLL hell time, but it is time to say this… NOW.
Thanks a lot, it saved me…
Welcome.
BTW, thanks–it ran for what seemed like > 5 minutes (no more than 10) but you’ve helped return control of my computer back to its rightful owner!
Did all of the above. Says ” All compilations are upto date” and then the moment i decide to shut down the cmd. It starts all over again .
Please Help .
P.S. i also tried doing this for the 4.0 39 Framework but to No avail.
Okay, I probably did spelling mistake, hence the problem was coming.
But doing executequeueditems on both 2.0.5077 and 4.0.30319 under Framework and Framework64 gives me :
All Compilation Target are uptodate
And yet mscorsvw is eating 97-99% of my CPU, all 4 cores multi -threaded into 8 cores.
Please Help.
i am running windows 8 enterprise 64 bit i Did all of the above. Says ” All compilations are upto date” but the moment i connect to internet i get a error saying “mscorsvw.exe has stopped working” i am not even getting .NET Runtime Optimization Service v2.0.50727 _x86 in windows service list too help me plz…!!
C:\Windows\Microsoft.NET\Framework\v4.0.30319>ngen.exe executequeueitems
Microsoft (R) CLR Native Image Generator – Version 4.0.30319.17929
Copyright (c) Microsoft Corporation. All rights reserved.
WARNING: This syntax is deprecated or you mis-typed your command. Run “ngen /?”
to display a list of the currently supported parameters.
Uninstalling assembly executequeueitems because of an error during compilation:
O sistema não pode encontrar o arquivo especificado. (Exception from HRESULT: 0x
80070002).
O sistema não pode encontrar o arquivo especificado. (Exception from HRESULT: 0x
80070002)
C:\Windows\Microsoft.NET\Framework\v4.0.30319>ngen.exe executequeueitems
Microsoft (R) CLR Native Image Generator – Version 4.0.30319.17929
Copyright (c) Microsoft Corporation. All rights reserved.
WARNING: This syntax is deprecated or you mis-typed your command. Run “ngen /?”
to display a list of the currently supported parameters.
Uninstalling assembly executequeueitems because of an error during compilation:
O sistema não pode encontrar o arquivo especificado. (Exception from HRESULT: 0x
80070002).
O sistema não pode encontrar o arquivo especificado. (Exception from HRESULT: 0x
80070002)
Sorry
but your command is a bit wrong
his tip works if u know how to run cmd an have half a brain come on now windows xp sp3 an it fixxed my error was drivein me insain thanks man xXx
Jeoy what you said is true, we can provide instructions, users have do it themselves.
Thanks for advice
Welcome.
{ 1 trackback }