none
How to re-NGEN ? RRS feed

  • Question

  • If I understand correctly, compiler optimize native images for processor architecture on which it run.

    Let's consider this scenario:
    Windows 7 image is customized on PC with Intel's Skylake CPU, then captured  and deployed on PC with different CPU architecture, let's say AMD Excavator or even Intel's "Atom" line.

    If we try to run ngen.exe ExecuteQueuedItems, we get message that "All
    compilation targets are up to date". So the native images remain unoptimized
    for processor on which customized image is deployed.

    How to re-run compilation?

    • Moved by 宝宝徐 Tuesday, June 13, 2017 3:07 AM
    Tuesday, June 6, 2017 2:31 PM

Answers

  • Hi,

    It seems that it was not the .NET Framework setup issue.

    >>If we try to run ngen.exe ExecuteQueuedItems, we get message that "All
    compilation targets are up to date". So the native images remain unoptimized
    for processor on which customized image is deployed.

    >>How to re-run compilation?

    Do you mean that you want to delete the native images for your assembly and generate a new one? 

    If so, I think you could view the command lines here:

    https://msdn.microsoft.com/en-us/library/6t9t5wcf(v=vs.110).aspx

    Like:

    uninstall [assemblyName | assemblyPath] [scenarios] [config]: Delete the native images of an assembly and its dependencies from the native image cache.

    /Debug:

    Generate native images that can be used under a debugger.

    Best Regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, June 7, 2017 9:56 AM
  • Hi all,

    Well, it can be answer but not a solution. It will delete native images of just one assembly.

    Anyway, according to this thread:

    https://superuser.com/questions/760474/does-the-net-framework-need-to-be-reoptimized-after-upgrading-to-a-new-cpu-micr

    optimization is a myth, ngen always assume Pentium 4 as a processor. This information kind of cancels my question.

    Saturday, June 17, 2017 5:15 PM

All replies

  • Hi,

    It seems that it was not the .NET Framework setup issue.

    >>If we try to run ngen.exe ExecuteQueuedItems, we get message that "All
    compilation targets are up to date". So the native images remain unoptimized
    for processor on which customized image is deployed.

    >>How to re-run compilation?

    Do you mean that you want to delete the native images for your assembly and generate a new one? 

    If so, I think you could view the command lines here:

    https://msdn.microsoft.com/en-us/library/6t9t5wcf(v=vs.110).aspx

    Like:

    uninstall [assemblyName | assemblyPath] [scenarios] [config]: Delete the native images of an assembly and its dependencies from the native image cache.

    /Debug:

    Generate native images that can be used under a debugger.

    Best Regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, June 7, 2017 9:56 AM
  • Hi all,

    Well, it can be answer but not a solution. It will delete native images of just one assembly.

    Anyway, according to this thread:

    https://superuser.com/questions/760474/does-the-net-framework-need-to-be-reoptimized-after-upgrading-to-a-new-cpu-micr

    optimization is a myth, ngen always assume Pentium 4 as a processor. This information kind of cancels my question.

    Saturday, June 17, 2017 5:15 PM