Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Visual Studio 2008 Standard create a single EXE that does not require .NET framework?

This is truly a beginner question, so I apologize in advance.

I have Visual Studio 2008 Standard installed and would like to create a small Windows application that does NOT require any .NET framework when run on computers. Does VS 2008 Standard support such a feature? Any pointers on how to accomplish this would be fantastic.

Thanks in advance.


2 Answers

Sure, you can definitely do this. You'll have to write your application in C++, though.

To get started, go to File | New, and under Project Types pick one of the options under Visual C++. For the minimal dependencies, I would suggest one of the Win32 options. Both the "Win32 Console Application" and the "Win32 Project" options appear to take you to the same wizard, which if you click Application Settings on the left lets you pick whether to create a console app or a windows app. A console app will run in a console window like cmd.exe, whereas a windows app will initially have no UI (you'll have to do the UI yourself).

Be aware that even if you don't depend on the .NET runtime, you'll still need to have the CRT dlls available on machines that will be running your program. The redistributables for these live under the Visual Studio install dir, which if you installed in the default location would be C:\Program Files\Microsoft Visual Studio 9.0\VC\redist.

like image 69
Charlie Avatar answered Nov 22 '25 03:11

Charlie


There are third party compilers like Salamander (damn expensive).

See also: How to compile a .NET application to native code?

like image 41
Corbin March Avatar answered Nov 22 '25 04:11

Corbin March



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!