Export (0) Print
Expand All

Native Image Task

.NET Framework 4.5

The native image task is a Windows task that generates and maintains native images. The native image task generates and reclaims native images automatically for supported scenarios. (See Creating Native Images.) It also enables installers to use Ngen.exe (Native Image Generator) to create and update native images at a deferred time.

The native image task is registered once for each CPU architecture supported on a computer, to allow compilation for applications that target each architecture:

Task name

32-bit computer

64-bit computer

NET Framework NGEN v4.0.30319



NET Framework NGEN v4.0.30319 64



The native image task is is available in the .NET Framework 4.5 and later versions, when running on Windows 8 or later. On earlier versions of Windows, the .NET Framework uses the Native Image Service.

In general, the Windows Task Scheduler starts the native image task every night when the computer is idle. The task checks for any deferred work that is queued by application installers, any deferred native image update requests, and any automatic image creation. The task completes outstanding work items and then shuts down. If the computer stops being idle while the task is running, the task stops.

You can also start the native image task manually through the Task Scheduler UI or through manual calls to NGen.exe. If the task is started through either of these methods, it will continue running when the computer is no longer idle. Images created manually by using NGen.exe are prioritized to enable predictable behavior for application installers.

© 2014 Microsoft