Native Image Generation

.NET Framework 4.5

Native image generation improves the performance of managed applications. A native image is an executable file that contains compiled processor-specific machine code for a managed assembly. It is stored in a native image cache on the local computer. The .NET Framework runtime can use native images from the cache instead of using the just-in-time (JIT) compiler to compile the assembly. Using native images typically benefits applications by improving their startup times. Shared assemblies, such as the assemblies that make up the .NET Framework, also benefit from native image generation by reduced memory requirements: When assemblies are compiled by the JIT compiler, their compiled code is duplicated. By contrast, the native image for an assembly is identical in each consuming application, which allows the operating system to share the native image across applications and reduce the overall memory required.

Beginning with the .NET Framework 4.5, native images can be generated automatically and reclaimed automatically based on application use. In earlier versions of the .NET Framework, the developer was responsible for requesting the generation of native images, as part of the installation of the application. The topics in this section describe native image generation, and the scenarios in which the .NET Framework handles it automatically.

Title

Description

Native Images

Describes native images, and explains the considerations for using them in scenarios where automatic image generation is not available.

Creating Native Images

Describes the scenarios in which native images are generated and reclaimed automatically, and explains how to generate and install native images manually by using the Ngen.exe tool.

Reclaiming Native Images

Describes the reclamation of automatically installed native images, and the process of uninstalling native images manually.

Advanced Native Image Generation Scenarios

Describes assembly dependencies, assembly sharing, debugging and profiling, binding issues, and other features of manual image generation.

The Native Image Generation Log

Describes the log file (ngen.log) that records success and failure information for native image generation, and explains how to set the level of detail of log entries.

Troubleshooting Automatic Native Image Generation

Describes where to get information and report issues, if errors occur in automatic native image generation when your app goes through certification testing for the Windows Store.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft