During an Exchange CU update we were getting the below message
Prior to this all the Exchange servers were fully patched including the latest .net assemblies since it was CU5 upgrade.
If we look into the task manager we can see this process running and consuming large CPU resources. This is a .net related process that does the compilation job based on the priorities it is having high priority assemblies and low priority assemblies.
What is MSCORSVW.exe?
The .Net framework has technology called Native Image Generator Technology (NGEN) which will speed up the process for .net apps which will run only on a periodic basis purely to improve the performance of that machine
This process MSCORSVW.exe is used by NGEN to improve the startup performance of .NET apps. So probably after an windows update especially .net patch if we have we can see this process running only at that time and consuming more CPU.
Solution for this problem:
- Solution 1: We can wait for a while for this .net compilation job to complete probably 5 or 10 minutes time. Once completed if we rerun the setup things will go fine.
- Solution 2: By default, NGEN only uses one CPU core for this operation . There is an option to make this work done quickly by making it to use up to 6 cores when we require them. By doing this it will complete its compilation job quickly.
Open CMD in elevated mode and run this command from this path
Running the above will Execute queued compilation jobs with extra CPU cores and make it faster.Now wait for the process to precompile all the assemblies, after a couple of minutes it will be completed.
There will be ngen log as well generated in the same location where we executed this command which we can have a look at after the job completes.
Thanks & Regards
Thank you for sharing, This helped