C# --> .exe

  • Thread starter Thread starter Tim Bücker
  • Start date Start date
T

Tim Bücker

Hello.

Is it somehow possible to create a real exe in C# and not only the IL? I
think for Java there is a possibility...

Greetings and thanks for all information,
Tim.
 
Hi Tim,

For all intents and purposes you do create real exes in C#. They compile
to
filename.exe. You can furthermore create native code to speed up
execution.
If you mean an exe as in a stand alone file being able to run on a sytem
without .Net installed, then no, but neither could you run a file requiring
vbrun300.dll or mfc42.dll if those weren't present.
 
im Newsbeitrag
Hi Morten,

first of all, thanks for the fast reply.
For all intents and purposes you do create real exes in C#. They compile
to filename.exe. You can furthermore create native code to speed up
execution.

This is what I meant:
If you mean an exe as in a stand alone file being able to run on a sytem
without .Net installed, then no, but neither could you run a file requiring
vbrun300.dll or mfc42.dll if those weren't present.

But if you copy the dlls everything is ok.
I think in .NET it is not enough to just copy the needed dlls...

So is there a way if one includes all the needed dlls?
Greetings and thanks again,
Tim.
 
im Newsbeitrag
Hi Morten,

first of all, thanks for the fast reply.


This is what I meant:

But if you copy the dlls everything is ok.
I think in .NET it is not enough to just copy the needed dlls...

So is there a way if one includes all the needed dlls?
Greetings and thanks again,
Tim.

You are correct, it is simpler to just copy the dlls. A more appropriate
example would be DirectX which needs to be installed and not just copied.
There are third party solutions that encapsulate the .net program inside
its own framework, but I don't know how well they are and they are
certainly not free.

Then again, I don't think java is capable of running without the java
framework either.

For now, .net is installed by default from windows 2003 and later, but for
any other versions you need to ensure that it is installed before you can
run any .net programs. You can ship a single installation file (.net
redistributable) with your program much like DirectX is shipped with a
game.
 
Morten said:
You use ngen.exe, found in the framework directory.


But you really want to do that as part of your install process, so that
ngen runs on the actual client machine. Otherwise your ngen process will
optimize the .exe for the machine you run that on, and not for the
actual client machine.

Lowell
 
If you mean a native format exe, you can do so only if you can generate
an ahead of time compiled version of the assembly using ngen.exe. I have
not tried it so I cannot vouch for their working.

with regards,


J.V.Ravichandran
- http://www.geocities.com/
jvravichandran
- http://www.411asp.net/func/search?
qry=Ravichandran+J.V.&cob=aspnetpro
- http://www.southasianoutlook.com
- http://www.MSDNAA.Net
- http://www.csharphelp.com
- http://www.poetry.com/Publications/
display.asp?ID=P3966388&BN=999&PN=2
- Or, just search on "J.V.Ravichandran"
at http://www.Google.com
 
Back
Top