none
NGen.exe RRS feed

  • Question

  • I have a WPF application compiled in VS 2015. I have installed .Net 4.6.1 on my customers computers. My customer loads my app from a network location. When is Ngen happening, if at all?

    Certified Geek

    Wednesday, July 20, 2016 1:44 PM

Answers

All replies

  • Dear Arne,

    Welcome to the MSDN forum.

    >> When is Ngen happening, if at all?

    Could you please description the detail information about this question, it will help us to easier understand and provide the answer or solution.

    If you want to use Ngen to make the managed code complied to native code in advance, and your customer load your application form a network location, as far as I know, the installation of the .NET Framework 4.6.1 is still required on your customer computers, the Ngen function just improve the speed of the code running.

    If I have misunderstanding of this question, please feel free to let me know.

    Best regards,

    Sara


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Thursday, July 21, 2016 2:07 AM
    Moderator
  • Dear Sara,
    Do I need to run NGEN manually on the customer's computer, or is the .net framework doing ngen at run time of my app?

    I found an ngen service on my computer. What does it do?

    How do I verify that ngen has run successfully?

    Will ngen run for an app at a network location?

    Is a public Key Token required?


    Certified Geek






    • Edited by Arne MN Thursday, July 21, 2016 1:11 PM
    Thursday, July 21, 2016 11:24 AM
  • Dear Arne,

    Thank you for your update.

    >> Do I need to run NGEN manually on the customer's computer, or is the .net framework doing ngen at run time of my app?

    No, The Native Image Generator (Ngen.exe) is a tool that improves the performance of managed applications, since you already used it on your local computer for your application.

    >> I found an ngen service on my computer. What does it do?

    The usage of the native image server, please check here: https://msdn.microsoft.com/en-us/library/ms165074(v=vs.100).aspx

    For other 3 questions, it looks like related to when/how to use NGen, it’s hard to describe it by serval sentences, please have a look at the following link:

    When to use NGen: https://blogs.msdn.microsoft.com/clrcodegeneration/2007/09/15/to-ngen-or-not-to-ngen/

    How to use NGen: http://stackoverflow.com/questions/20144213/how-to-compile-with-ngen-exe-and-how-to-run-the-native-code-that-is-generated

    It’s a little complex, but it will better for you to understand and use the NGen functions in the future, thank you very much for your understanding.

    Best regards,

    Sara


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    • Marked as answer by Arne MN Monday, July 25, 2016 11:47 AM
    Friday, July 22, 2016 2:41 AM
    Moderator
  • Sara,
    Most of the links are from 2007. I am not sure the info is current. I have started to understand more about ngen, but it I am not completely satisfied.


    Certified Geek


    • Edited by Arne MN Monday, July 25, 2016 11:47 AM
    Monday, July 25, 2016 11:46 AM
  • Dear Arne,

    Thank you for your sharing.

    Since our forum is to discuss the .NET Framework Setup, if you have any other issue about the ngen.exe in the future, please feel free to let me know, I will help you re-direct to the appropriate support forum for the more professional support, thank you for your understanding.

    Best regards,

    Sara


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Tuesday, July 26, 2016 5:33 AM
    Moderator