Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1027453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:14:34+00:00 2026-05-16T12:14:34+00:00

If Ngen doesn’t protect my application, when would I reasonably expect to use this

  • 0

If Ngen doesn’t protect my application, when would I reasonably expect to use this application in my career?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T12:14:35+00:00Added an answer on May 16, 2026 at 12:14 pm

    Jeffrey Richter wrote a great piece in his book, I don’t know if the third release has it, but here is a great piece he wrote in 2002 about Ngen’ing which is still relevant.

    Highlights:

    Meanwhile, there are several potential
    problems with respect to NGen’d files:

    • No Intellectual Property Protection. Many people believe that
      it might be possible to ship NGend
      files without shipping the files
      containing the original IL code
      thereby keeping their intellectual
      property a secret. Unfortunately, this
      is not possible. At runtime, the CLR
      requires access to the assemblys
      metadata and the NGend files do not
      contain the metadata.

    • NGend Files Can Get Out-Of-Sync. When the CLR loads an
      NGen’d file it compares a number of
      attributes about the
      previously-compile code and the
      current execution environment. If any
      of the attributes don’t match then the
      NGen’d file cannot be used and the
      normal JIT compiler process is used
      instead.

    • Poor Administration. NGen’d file are not automatically deleted when an
      assembly is uninstalled adversely
      affecting the .NET Frameworks easy
      administration and XCOPY deployment
      story.

    • Inferior Load-Time Performance (Rebasing). When Windows loads an
      NGend file, it checks to see if the
      file loads at its preferred base
      address. If the file cant load at its
      preferred base address, then Windows
      relocates the file, fixing-up all of
      the memory address references. This is
      extremely time consuming because
      Windows must load the entire file into
      memory and modify various bytes within
      the file. For more information about
      rebasing please see my book:
      Programming Applications for Microsoft
      Windows, 4th Edition (Microsoft
      Press).

    Inferior Execution-Time Performance.

    When compiling code, NGen cant make as many assumptions about the execution environment as the JIT compiler can. This causes NGen.exe to produce code with a number of memory-reference indirections that aren’t necessary for JIT compiled code

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code that should nGen my main application EXE: using System; using
Is it better to use NGEN an ASP.NET application when we know it is
I tried to use ngen.exe to get native image from CIL binary. This site
I would like to use NGEN.EXE in order to generate native images of my
I didn't use NGen before but now I need to improve startup performance of
When ngen is executed on a .NET managed application at installation time, and a
We use Wix to build an installer for our .NET application and are just
I am using ngen.exe (the .Net Native Image Generator) version 2.0.50727.312. Is this the
I am trying to include ngen to my installer using this article . I
Is it possible to use NGen with ClickOnce deployment?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.