Deploy a .Net application - is there "compilation during installation"

  • Thread starter Thread starter Action
  • Start date Start date
Hi,

From your VS.Net project poperties you can set this option(Configeration
properties, release mode, platform).
If you are using the command line paramaters please use /target:exe ,
/target:winexe to produce the native windows exe.

--
Let me know if you need further help

Regards
Sreejumon[MVP]
www.mstechzone.com
 
Thank you
I found that /target:exe is a default option

Actually, I don't really understand the flow of a .net program
is that
..cs->MSIL>exe?
or the code inside the exe after compile it using csc.exe is actually
MSIL?or it is already machine code already??

thank you
 
It's better to select this option in the setup project for your application,
this will convert you app to native code during installation...
 
Gurudev said:
It's better to select this option in the setup project for your application,
this will convert you app to native code during installation...
Unless you have a large app with a critical startup time, running ngen on
the assembly will more likely degrade performance than increase it.
 
Action said:
Thank you
I found that /target:exe is a default option

Actually, I don't really understand the flow of a .net program
is that
.cs->MSIL>exe?
or the code inside the exe after compile it using csc.exe is actually
MSIL?or it is already machine code already??
The code inside of hte EXE is in MSIL, when the executable is run, the code
is JIT'd (Just In Time Compiled) into machine code. The JIT compiler can
provide some optimizations not possible at compiletime (such as emitting cpu
specific instructions, tho I don't know wo what level it does that
currently), and it would allow, in theory, the saem executable to be used by
any system with a CLR installed.

You can run ngen on an assembly to generate cached native code for the
current system. This isn't the same as translating the exe and the cache may
be thrown out if you upgrade CPU, change OS, or probably a number of other
things. The cache copy also is less likely to be as performant as the JIT'd
version, however that really is a matter of the app.
 
Back
Top