11
7
Whenever I leave my computer idle for a few minutes I come back and my Process Explorer shows that 'ngen.exe' is running and occupying 2 of my 4 cpus.
Question: Is there a way to turn NGEN.exe off as a background task?
I'd like to (as do many others on the internet) compile all the .net binaries all at once instead of having the computer 'automatically' doing so every time I leave the computer idle. I've checked throughout Microsoft forums and so far nobody has a complete answer to this problem, and many are having the same issues.
Apparently some library in .net framework is needing to be recompiled and it gets 'stuck' and puts the CPU into high and loops over and over again.
I've just experienced this same issue and there is another thread attempts to answer it but it is incomplete
Regedit of /HKLM/SOFTWARE/Microsoft/Windows/Current Version/RUN has no entry to run the .net compiler. Something else must be causing ngen.exe to trigger.
Can someone post other locations that might be triggering this to run?
I'd like to turn it off as I'm sure many others would. I also disabled automatic updates in Windows 10.
UPDATE: Process explorer says this is what is running:
"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe" uninstall "C:\WINDOWS\assembly\NativeImages_v4.0.30319_64\Microsoft.Vf9a08577#\328b1bc4205c08821860805bf5e6c99e\Microsoft.VisualStudio.Tools.Applications.Hosting.ni.dll" /noroot /LegacyServiceBehavior – Viktor 5 mins ago
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\ngen.exe" uninstall "C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\PresentationFramewo#\7fa93028119b98117acfd5ea18f15c13\PresentationFramework.ni.dll" /noroot /LegacyServiceBehavior – Viktor 4 mins ago edit
"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ngen.exe" uninstall "C:\WINDOWS\assembly\NativeImages_v2.0.50727_64\Microsoft.PowerShel#\23dfb41f48958215c80bbbc0c9177cb2\Microsoft.PowerShell.Commands.Utility.ni.dll" /noroot /LegacyServiceBehavior
It keeps running over and over and over again. - that's the output from Process explorer. Its extremely annoying and it seems to happen EVERY TIME I leave my desk.
QUESTION: it seems like these are legitimate processes. Does anyone know a way to manually remove those uninstall commands and compile the .net framework completely 1 time instead of having it loop over and over again?
CURRENTLY TESTING: I killed the process and ngentask.exe then went to Windows\assembly and moved those Native Image folders to a temporary directory. I'll keep you posted if it starts back up again. Chances are if the NativeImages folders are missing it won't try to keep uninstalling those assemblies.
I assume you have allowed the procedure to finish what its doing? The question you linked to isn't closed. "NGEN is the native code generator for the dotnet framework. it will churn away as a background task until the native assemblies have been generated" - You can do this manually if you want.
– Ramhound – 2016-09-19T20:11:49.820Related: Does the .NET Framework need to be reoptimized after upgrading to a new CPU microarchitecture?
– Ramhound – 2016-09-19T20:18:03.990Verify what is going on exactly by using Process Explorer. – Ramhound – 2016-09-19T20:19:25.163
If you are not going to update your question I can't help. – Ramhound – 2016-09-19T21:09:45.537
I updated the question and also updated the point saying that the old discussion was closed . Also put in the Process Explorer command lines. Also am testing an idea. I didn't allow the procedure to finish what its doing this time because it keeps starting and restarting. – Viktor – 2016-09-19T21:28:49.360
The old question is not closed though.... – Ramhound – 2016-09-19T22:01:13.993
re: old question closed - I updated my question to reflect that its not closed. Do you have any further insights? things to try? – Viktor – 2016-09-19T23:13:38.457
Already supplied lots of ideas .... heard nothing constructive....so just leaving Good Lick – Ramhound – 2016-09-19T23:42:53.363