After installing Microsoft .NET framework on your computer, you can notice mscorsvw.exe process running in the background in the Task Manager. Sometimes, this process consumes up to 100 percent of CPU and slows down your system, let’s take a look at what is this process? And how to disable it from running.
UPDATE Sep, 27, 2017: If you don’t want to use command prompt window to quicken up and end .NET Runtime Optimization service, you can run this Powershell script for the same.
If you’re using Windows 7 or later, you already have PowerShell installed on your computer.
Download this file and save to desktop or other location, right click on it and select ‘Run with Powershell’.
You should be running this script file under remotesigned or Undersigned PowerShell execution policy.
Open Windows PowerShell and run it as administrator, and type this command
After this set Execution policy to remote signed
You need to press [A] to say Yes to all to proceed.
You should expect the above provided PowelShell Script file to complete the .NET framework Optimization quickly as it uses 6 CPU cores, if you’ve system with slower hardware, stick to running the commands mentioned below.
Update July 27 2014: Added commands to stop mscorsvw.exe in Windows 7, Windows 8 and Windows 8.1.
Mscorsvw.exe is a process related to Microsoft .NET framework and is used to precompile .Net framework assemblies in the background.
This 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 within 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 that process as annoying, let me tell you we can shut down mscorsvw.exe process quickly.
Disabling or stopping mscorsvw.exe
1. On Windows XP: Navigate to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 in Windows Explorer (assuming you’ve .NET 2.0 or .NET 3.5 installed)
On Windows 7, you need to navigate to ‘C:\Windows\Microsoft.NET\Framework\v4.0.30319’ (assuming you’ve above .NET 4 version installed in your computer)
For 64-bit, this is the path: ‘C:\Windows\Microsoft.NET\Framework64\v4.0.30319’
2. Open the command prompt by typing cmd in the run box (use Win key+R ) and press enter.
3. Type cd/ and press Enter.
4. Now, we need to specify the above mentioned path in command and type ngen.exe executequeueditems and press enter as shown below without quotes.
XP: “C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>ngen.exe executequeueditems”
Tip: If you’re finding it difficult to type or enter the .NET framework path in command prompt window, do this: browse to .NET directory path you’ve to type in Explorer, hold the shift button, on the right click menu select ‘open command window here’, check this link for the screenshot.
32-bit Windows 7 : “C:\Windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe executeQueuedItems ”
64-bit: “C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe executeQueuedItems”
32-bit Windows 8/8.1 : C:\Windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe executeQueuedItems
schTasks /run /Tn “\Microsoft\Windows\.NET Framework\.NET Framework NGEN v4.0.30319”
64-bit: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe executeQueuedItems
schTasks /run /Tn “\Microsoft\Windows\.NET Framework\.NET Framework NGEN v4.0.30319 64”
5. Now wait for the process to precompile all the assemblies, after a couple of minutes it will be completed.
6. Restart your computer.