5

when we create an application in VC#, talking about .net 3.5 in particular, the are comipled to CLR, what i want is that they should be compiled to EXE executable code that doesn't require .NET Framework Environment for them to run. Is it possible

Moon
  • 19,518
  • 56
  • 138
  • 200
  • See this thread from May - http://stackoverflow.com/questions/846978/how-to-convert-a-net-exe-to-native-win32-exe – TLiebe Aug 29 '09 at 05:21

4 Answers4

5

I guess you're asking how to statically link the parts of the framework your application needs. Please see this link from Jon Skeet for info on how to do that: http://www.yoda.arachsys.com/csharp/faq/#framework.required

Brian Rasmussen
  • 114,645
  • 34
  • 221
  • 317
1

There are 3rd party products that do this. I know of no free ones.

Preet Sangha
  • 64,563
  • 18
  • 145
  • 216
1

Even if you get a third party product, I think it just packages the .NET runtime in there somehow. I don't know how else it would run.

Why don't you just create an installer that has the .NET framework as a requirement? It should check for it and install it if the user doesn't have it already.

Shea Daniels
  • 3,232
  • 3
  • 23
  • 27
  • people don't like ten types of frame works n runtimes on their PCs like me , i really have a problem with JRE – Moon Aug 29 '09 at 06:23
  • If you package the framework up with your application, you're going to end up with even more copies in scattered places. If you don't want have a framework installed then you might want to consider a different programming language. All those nice API calls have to live somewhere. – Shea Daniels Aug 29 '09 at 06:49
1

you can use MONO's ahead of time compiler