views:

177

answers:

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

+1  A: 

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

Preet Sangha
+2  A: 

See this thread from May - http://stackoverflow.com/questions/846978/how-to-convert-a-net-exe-to-native-win32-exe

TLiebe
+1  A: 

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
people don't like ten types of frame works n runtimes on their PCs like me , i really have a problem with JRE
Junaid Saeed
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
+4  A: 

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
yet another one from mr skeet lol :P
baeltazor
A: 

you can use MONO's ahead of time compiler