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

S

Sreejumon[MVP]

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
 
A

Action

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
 
G

Gurudev

It's better to select this option in the setup project for your application,
this will convert you app to native code during installation...
 
D

Daniel O'Connell

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.
 
D

Daniel O'Connell

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.
 

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

Top