Article ID: 2570538 - View products that this article applies to.
Expand all | Collapse all

Symptoms

When you install an update for the Microsoft .NET Framework 4, the Native Image Generator (NGen.exe) uses a high percentage of the CPU cycles on the computer for a long time. This time varies with how many Native Images are installed on the computer.

Cause

Updates to the .NET Framework 4 require a complete regeneration of the Native Image Cache, a very time-consuming operation. For some computers, an interaction with previously installed Native Images may cause Native Image regeneration to take much longer than expected. Although this issue only affects setup times, the effect can be several minutes to tens of minutes. Computers that have more Native Images installed will see longer generation times.

Workaround

To have us work around this problem for you, go to the "Fix it for me" section. If you prefer to fix this problem yourself, go to the "Let me fix it myself" section.

Fix it for me


To fix this problem automatically, click the Fix it button or link. Then click Run in the File Download dialog box, and follow the steps in the Fix it wizard.
Collapse this tableExpand this table
For the Microsoft .NET Framework 4, 32-bit editionFor the Microsoft .NET Framework 4, 64-bit editionFor the Microsoft .NET Framework 4, Itanium edition
Collapse this imageExpand this image
assets fixit1
Fix this problem
Microsoft Fix it 50735
Collapse this imageExpand this image
assets fixit2
Collapse this imageExpand this image
assets fixit1
Fix this problem
Microsoft Fix it 50736
Collapse this imageExpand this image
assets fixit2
Collapse this imageExpand this image
assets fixit1
Fix this problem
Microsoft Fix it 50737
Collapse this imageExpand this image
assets fixit2


Notes
  • This wizard may be in English only. However, the automatic fix also works for other language versions of Windows.
  • If you are not on the computer that has the problem, you can save the automatic fix to a flash drive or to a CD, and then you can run it on the computer that has the problem.

Let me fix it myself

To work around this problem, you may be able to reduce Native Image Generation times somewhat by forcing NGen.exe to generate new Native Images without regard for what was previously generated.

To improve regeneration times, immediately before you install the .NET Framework 4 update, open an elevated command prompt and run the following commands.

Important Run these commands immediately before you apply the update. Otherwise, these commands are less effective.

On a computer that is running a 32-bit Windows operating system
%windir%\microsoft.net\framework\v4.0.30319\ngen.exe update /force /queue

On a computer that is running a 64-bit Windows operating system
%windir%\microsoft.net\framework\v4.0.30319\ngen.exe update /force /queue

%windir%\microsoft.net\framework64\v4.0.30319\ngen.exe update /force /queue

Properties

Article ID: 2570538 - Last Review: September 11, 2013 - Revision: 5.0
Applies to
  • Microsoft .NET Framework 4
Keywords: 
kbexpertiseinter kbprb kbsurveynew kbmsifixme kbfixme KB2570538

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com