none
How to disable NGEN RRS feed

  • Question

  • Hi,

    We have a tool that uses multiple assemblies and we generate a new version of the tool about twice a day. But if a user run the tool more than once, it seems the second time it starts using some NativeImage assemblies which causes most minidumps to be useless because the stack cannot be resolved beyond those Native Image file (WindowsBase.ni.dll for example). Since we have a very frequent release cadence I was wondering if we could just disable any NativeImage from being used by our app. I tried using the ini trick, it may work for the app itself but it still loads Native Image sub assemblies so it doesn't help us there.

    Any help would be appreciated.

    Monday, October 22, 2018 7:30 PM

Answers

  • Hi Sebastien Poirier,

    Sorry for late reply.

    V2 version is too old. On Windows Vista and all earlier versions of Microsoft Windows, the name is ".NET Runtime Optimization Service v2.0.50727_X86" or ".NET Runtime Optimization Service v2.0.50727_X64".

    Now it use NET Framework NGEN v4.0.30319, NET Framework NGEN v4.0.30319 64 in the .NET Framework 4.5 and later versions, when running on Windows 8 or later.

    Best Regards,

    Wendy


    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, October 31, 2018 8:02 AM
    Moderator

All replies

  • Hi Sebastien Poirier,

    Thank you for posting here.

    For your question, you could try the suggestions in the link below to disable the NGEG.

    https://answers.microsoft.com/en-us/windows/forum/windows_10-performance/how-to-stopuninstall-ngenexe/615fb76e-3340-453b-958d-c0a1c420d806

    Best Regards,

    Wendy


    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.

    Tuesday, October 23, 2018 2:24 AM
    Moderator
  • We can try that on users machines but we were looking for a less intrusive way like disabling only for our particular application. But if it is not possible and the only way is to kill ngen.exe and ngentask.exe before launching our application, we'll do it.

    Thanks

    Tuesday, October 23, 2018 2:56 PM
  • Actually looking at the tasks, those are not running so we would need to disable the scheduled task from those machines. There is a mention in the post about removing a key from the registry, though it is referring to .Net v2.0.50727 and we're using v4. And in the registry, the only place I could find the NGenService is inside that v2 version. Is it still used even if we are using the v4?
    Tuesday, October 23, 2018 6:16 PM
  • Hi Sebastien Poirier,

    Sorry for late reply.

    V2 version is too old. On Windows Vista and all earlier versions of Microsoft Windows, the name is ".NET Runtime Optimization Service v2.0.50727_X86" or ".NET Runtime Optimization Service v2.0.50727_X64".

    Now it use NET Framework NGEN v4.0.30319, NET Framework NGEN v4.0.30319 64 in the .NET Framework 4.5 and later versions, when running on Windows 8 or later.

    Best Regards,

    Wendy


    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, October 31, 2018 8:02 AM
    Moderator