Why won't the Microsoft .NET Framework NGEN v4.0.30319_x64 service start?

49,163

Solution 1

This is a service that is started and stop "as-needed" by the ngen (Native Image Generator) executable. According to this MSDN page, the service typically starts in conjunction with a installation program (installer) or by direct interaction with the ngen executable.

As far as I know, the behavior you described is standard/correct behavior.

Solution 2

.NET Framework NGEN v4.0.30319_x86 service will not start - Normal? has a way to verify installation:

NGEN stands for "Native Image Generation". It is a tool that improves the performance of managed applications. For your concern, I would suggest you to read the following two helpful links to understand NGEN:

  • The Performance Benefits of NGen. mentions:

    NGen refers to the process of precompiling Microsoft® intermediate language (MSIL) executables into machine code prior to execution time. This results in two primary performance benefits. First, it reduces application startup time by avoiding the need to compile code at run time. Second, it improves memory usage by allowing for code pages to be shared across multiple processes.

  • Ngen.exe (Native Image Generator) mentions:

    The Native Image Generator (Ngen.exe) is a tool that improves the performance of managed applications. Ngen.exe creates native images, which are files containing compiled processor-specific machine code, and installs them into the native image cache on the local computer. The runtime can use native images from the cache instead of using the just-in-time (JIT) compiler to compile the original assembly.

    This tool is automatically installed with Visual Studio and with the Windows SDK. To run the tool, we recommend that you use the Visual Studio Command Prompt or the Windows SDK Command Prompt (CMD Shell). These utilities enable you to run the tool easily, without navigating to the installation folder.

    To run Ngen.exe, you must have administrative privileges.

I noticed that you have tried the Verification Tool to check the installation of .NET Framework 4.0 on your machine. What's the result? You can find the verification result from "Current Status" after you run the tool.

Can you see what this tool returns for you?

Share:
49,163

Related videos on Youtube

Pragmatic Coder
Author by

Pragmatic Coder

Updated on September 18, 2022

Comments

  • Pragmatic Coder
    Pragmatic Coder almost 2 years

    I just installed the .NET 4.0 framework and see Microsoft .NET Framework NGEN v4.0.30319_x64 listed in services.msc. It is set for Automatic-Delayed Start. However, it is in a stopped state and when I try to start the service I get the message:

    The Microsoft .NET Framework NGEN v4.0.30319_x64 service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs.

    Why am I not able to start this service?

    • Rup
      Rup almost 13 years
      I expect it's started on-demand as and when there are jobs for it. Why do you want to start it? What are you trying to achieve? What problems are you seeing because it's not running?
    • Justin Dearing
      Justin Dearing almost 13 years
      Why do you need this service started?