ngen.exe high cpu windows 10 - Assemblies Uninstall Endless Loop

Download the Easy NGEN Script, run it as admin and select option 1 to do a full ngen run:

enter image description here

This takes alot of time and does all pending ngen operations. After this the ngen queue is empty and you shouldn't see the other tasks again.


Deleting a key in the registry is what finally worked for me. The problem was that ngen would try to keep reallocating memory over and over for the same corrupt DLL in the registry. It would eventually use up all the available memory on the computer.

Deleting the key "\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework\v2.0.50727\NGenService\Roots" worked for me. Stopping the scheduled task or killing ngen.exe is just a temporary measure and doesn't address the problem.

How Microsoft could let a problem like this go on for so long is beyond me. Today was the first day a search resulted in an answer for me.

More information on the problem can be found here https://aloiskraus.wordpress.com/2017/12/13/the-case-of-ngen-exe-needing-50-gb-of-memory/