How can I generate a native, non-managed Windows executable using modern development tools and languages (like C#, avoiding C/C++)? Specifically, the executable should not have a .NET framework dependency.
Asked
Active
Viewed 187 times
3
-
1Java? But why do you want to do that, Windows 7 and 8 comes with .Net framework pre-installed – Dhawalk Jan 09 '13 at 21:17
-
@Oded: That still requires the .Net framework to run. – SLaks Jan 09 '13 at 21:18
-
@Oded: You cannot redistribute NGen binaries to other machines since they depend on the .NET Framework patch level. So you need to generate them on the target machine. Guess what NGen needs the .NET Framework installed. As far as I know there is even a machine specific identifier added to prevent such things. – Alois Kraus Jan 09 '13 at 21:19
-
3See: http://stackoverflow.com/questions/953146/running-net-based-application-without-net-framework – e_ne Jan 09 '13 at 21:20
-
2I'm not sure what's wrong with this question. Just because the answer is likely "no", it doesn't make it an ambiguous, vague, incomplete, overly broad, or rhetorical question. – dtb Jan 09 '13 at 21:20
-
2Delphi (Pascal) is still a popular environment for Windows application development. – SirDarius Jan 09 '13 at 21:21
-
The best choice for real, compiled, native EXE application is still Delphi, in my opinion. No frameworks needed to run it - neither .NET nor Java Runtime - and it produces high quality and well crafted EXE's, and has a powerful library to support it – marc_s Jan 09 '13 at 21:22
-
1The thing is that we have lots of old pcs at my company running XP. Installing the framework for some of our new apps might not be feasible. We still use VB6 for development. I'd like to upgrade my dev env a little bit – Carlos Blanco Jan 09 '13 at 21:22
-
Installing the framework on XP is a problem? I've deployed .NET apps to many, MANY XP machines. You can either install the framework manually, or build an installer to include it. – Jon B Jan 09 '13 at 21:25
-
Depending on the Service Pack installed on XP, you can use .NET 2.0, 3.5 or 4.0. [Details](http://stackoverflow.com/questions/4204194/is-net-4-0-compatible-with-windows-xp-sp2-or-below) – dtb Jan 09 '13 at 21:26
-
1Is not only installing the framework. I've also noticed .Net apps take longer to load on old hardware and appear slower. Not using the .Net framework is just something I'm curious about. – Carlos Blanco Jan 09 '13 at 21:29
1 Answers
4
If you like C#, which is undoubtedly a modern and great programming language, you might enjoy the D programming language which in many ways resembles C# in its goal as a modern alternative to C++.
And yes, the dmd compiler creates native Windows executables, and the language even has a Garbage Collector for automatic memory management.
If you are looking for an IDE for D, this question: https://stackoverflow.com/questions/50179/an-ide-for-d will give you a few options.
-
The D language looks promising. Just wondering, can I use visual components and connect to DB's with it? I mean. I won't have to use GTK or QT like in some other languages. – Carlos Blanco Jan 09 '13 at 21:32
-
1Yes you can: http://www.dsource.org/projects/dwt and yes you can: https://code.google.com/p/d-dbapi/, http://www.prowiki.org/wiki4d/wiki.cgi?DatabaseBindings – SirDarius Jan 09 '13 at 21:33