This article explains what is the mscorsvw.exe (.NET Runtime Optimization Service) process you see in the Task Manager of Windows 11/10 and if it is a virus. We also explain what it does, do you need it or can you disable or remove it in case it shows high CPU usage.
What is mscorsvw.exe in Windows 11/10?
David Notario’s long back made the following observation on Microsoft’s MSDN blog:
mscorsvw.exe is precompiling .NET assemblies in the background. Once it’s done, it will go away. Typically, after you install the .NET Redist, it will be done with the high priority assemblies in 5 to 10 minutes and then will wait until your computer is idle to process the low priority assemblies. Once it does that it will shutdown and you won’t see mscorsvw.exe. One important thing is that while you may see 100% CPU usage, the compilation happens in a process with low priority, so it tries not to steal the CPU for other stuff you are doing. Once everything is compiled, assemblies will now be able to share pages across different processes and warm start up will be typically much faster, so we’re not throwing away your cycles.
The cause is the mscorsvw.exe process is recompiling .NET assemblies in the background. So normally, the process will go away after a while and your computer speed should be back to normal. Even if you wish, you cannot kill the process in the normal way.
Is mscorsvw.exe a virus?
The legit mscorsvw.exe file is located here:
C:\Windows\Microsoft.NET\Framework\
Or
C:\Windows\Microsoft.NET\Framework64
If it is found elsewhere, it could be malware.
Do I need mscorsvw.exe?
The .NET Runtime Optimization Service (mscorsvw.exe) is used in precompiling .NET assemblies in the background in the Windows operating system and so it is needed.
How do I disable mscorsvw.exe?
You should not disable mscorsvw.exe. If you wish, you can terminate this process.
Open Task Manager, click on the Details tab, locate the mscorsvw.exe process, right-click on it and select End process tree.
High CPU usage by mscorsvw.exe
At times, you may see high CPU usage by .NET Runtime Optimization Service (mscorsvw.exe). If you open the Task Manager in such a scenario, you will now find a process called mscorsvw.exe which has a CPU usage of more than 50%! This service is actually used by the .NET framework to pre-compile. So, what is the mscorsvw.exe process, and how to deal with it?
As mentioned earlier, the cause is the mscorsvw.exe process is recompiling .NET assemblies in the background. So normally, the process will go away after a while and your computer speed should be back to normal. Even if you wish, you cannot kill the process in the normal way.
This is because, the process mscorsvw.exe is a system process, so when you attempt to close it directly using the Task Manager, you won’t be able to do that! You have to be a bit proficient with CMD.
If you don’t want to wait until your computer is idle so that it can start compiling, you can do the following:
- Navigate to “C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319” in Windows Explorer.
- Click on Start, type CMD and run it as admin.
- On command prompt specify the above path and type
ngen.exe executequeueditems
. - This command will process all pending work.
- Once this is done, the service will shut down, as it has nothing else to do.
- Restart your computer; now you will see that there will be no mscorsvw.exe process running in Task Manager.
This post offers more suggestions on how to fix .NET Runtime Optimization Service High CPU usage on Windows 11/10.
Thought the big update went smoothly, so I got careless and let the Restore Point I needed get overwritten
The problem I had was subtle but bad, so I have just spent 3 hours with Computer Associates remotely reinstalling my Internet Suite, losing my last FREE reinstall
Lesson learned, make sure your Restore Point BEFORE your last M$ update is saved for at least a week — I noticed things just did not work properly and by the weekend, I suspected the update — Then it was too late, for I had lost the Restore Point I needed — From now on, when M$ wants to update, I shall do a Restore Point before I allow it
Same thing as comment above. I didnt create any restore point, and here I am with slow transfers, my usbs not working, and above it all, it takes thousand years for my computer to recognize my HDD. Even playing videos on my pc is catastrophic.
The only solution im left with is to do a complete system restore. I think Im done with the windows SPs updates
U need to run CMD as admi. that means you need to type CMD right-click the CMD program when shown and select “run as admin…” THEN you can do it. :-)
What do you mean by specify the above path and type the following command? Can you be more clear? Do I have to type the whole navigated path on CMD?
Hi again,
I typed the command as suggested, but I didn’t restart the computer. The only thing I noticed was CMD did not recognize the command. But after a while, the appearance of my windows screen changed, processor got faster, and the transition between tabs also became much smoother. I just have no idea what happened after I typed those commands, but something really changed about the overall performance and appearance also.
you have to write this @ cmd prompt….. “cd C:WINDOWSMicrosoft.NETFrameworkv2.0.50727” and then “ngen.exe executequeueditems”