How can I compile my VS2005 c# code to not be dependent on CLR to run?

  • Thread starter Thread starter Marcus
  • Start date Start date
M

Marcus

How can I compile my VS2005 c# code to not be dependent on CLR to run?

I want people that install my software to be able to run it without
having to bother with CLR's and "Windows installers".


I would like to generate a binary for lets say Windows XP.


How do I do this?
 
How can I compile my VS2005 c# code to not be dependent on CLR to run?

I want people that install my software to be able to run it without
having to bother with CLR's and "Windows installers".


I would like to generate a binary for lets say Windows XP.


How do I do this?

You can't.
It's like asking for a Java program to be able to run without the VM.
Or a VB6 program without the VB6 runtime, for that matter.


Massimo
 
Massimo,

That's not strictly correct. There are packages out there that offer a
stub implementation of the CLR and will compile them into your
executable.

Bear in mind that you're compiling a significant portion of the CLR
into your distribution. Do you want this? More importantly, does the
person you're giving the software to want this?

There's no free lunch. If you want nth-generation languages, you have
to pay the price with nth-generation runtimes. If you want code that
will run natively on XP, buy Petzold, learn Win32 programming, and
suffer through the pages of UI code you'll have to write.


Stephan
 
If you create your own msi file (it's not as complicated as you seems to
say) with the .net framework configured as a dependency, it will be
automatically installed. You even have the choice to embed the setup or let
the installer download it from MS servers.

If your application is quite "simple" and you don't want to deal with setup
managment, you can also user clickonce technology (a part of .Net 2.0) that
is able to install an application from a web page with very few steps for
the user.
Take a look at http://www.mentorrailroad.com/ of you want a sample program
that is deployed with this technology...

Hope that helps

Steve
 
If you create your own msi file (it's not as complicated as you seems to
say) with the .net framework configured as a dependency, it will be
automatically installed. You even have the choice to embed the setup or let
the installer download it from MS servers.

If your application is quite "simple" and you don't want to deal with setup
managment, you can also user clickonce technology (a part of .Net 2.0) that
is able to install an application from a web page with very few steps for
the user.
Take a look at http://www.mentorrailroad.com/ of you want a sample program
that is deployed with this technology...

Hope that helps

Steve
 
Back
Top