NGen

  • Thread starter Thread starter JMMB
  • Start date Start date
J

JMMB

Just a confirmation.
NGen generates native code when i install the windows application on the
client or when I run it for the first time?
thanks,
 
Actually neither, you have to manually run the ngen tool, or do it
explicitly in your deployment setup

Cheers
Benny
 
Actually neither, you have to manually run the ngen tool, or do it
explicitly in your deployment setup

Correct...

NGen has to be invoked manually on your assembly. When you do so
(ngen.exe myAssembly.exe) you can consider this action as running a
full JIT compilation (only JIT here means "now") on that assembly and
giving the result (native code).

However... It is advisable not to distribute assemblies that have
been ngen'ed on _your_ computer, since ngen will apply optimizations
for the computer it is currently running on... Unless you can ngen an
assembly to the target platform, do not ngen assemlbies that will be
distributed :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

ngen 12
Drawbacks of precompilation over jit compilation. 2
mscorsvw.exe fails with Exception,... 0
NGen - encrypt meta data - how? 1
GAC and NGEN 2
NGen During Install 2
NGen questions 1
Find out if .NET in use 3

Back
Top