Anonymous
Anonymous

Reputation:

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.

Upvotes: 2

Views: 21361

Answers (10)

Samuel
Samuel

Reputation: 11

I had the same problem. This is how I solved: Go to the "Build" tab. Click on "Configuration Manager". On the screen that pops up, click the "debug" drop down menu, and select "release". Click "Close" at the bottom. Re-click the build tab, and then click "rebuild solution". After it finishes, save all and exit. Go back to the main folder for your program, click "[name of folder] then the "release" folder that was created. Inside will be two files: an .exe and a "program debug database" file with the name of your original program on it. These two files together will work on any computer that does not have a .NET library installed etc. It is as close as I could get to a standalone .exe. Hope that helps.

Upvotes: 1

PDecker
PDecker

Reputation:

You doesn't need to deploy the redist dll's if you link your c/c++ statically. You can force that in the project settings, add a "/MT" to the compile command (without the quotes) if I remember correctly. Then he can just send off his exe and he won't need to send off the crt dlls also.

Of course, that means he won't pick up newly released features in windows updates of those dll's, but there's always a trade-off I suppose.

--edit: Ok, I found the switch that adds that argument; on the Property Page, Configuration Properties -> C/C++ -> Code Generation then "Runtime Library" should be set to an "non-dll" option. The two are /MT and /MTd (debug).

Upvotes: 0

Joel
Joel

Reputation: 16664

The only way I have seen anyone get a standalone (not requiring .net to be installed) exe from C# or VB.net is using a program that wraps the framework (at least, the used libraries) in with your exe. And those cost money. you won't find any other way to do it. It's like trying to run a Java app without the Java VM

Upvotes: 0

EXE_Admirer
EXE_Admirer

Reputation:

Also,

There supposed to be several inexpensive (i.e., rather cheap) tools that would link non-net app's DLL(s) together, such as:

  1. Molebox Pro (eu 100)
  2. BitArt's Fusion ($160)
  3. VB Wrap ($100)
  4. PE Bundle ($30)

Additionally,

There's a protection-oriented tool called "Themida" from www.oreans.com that, if purchased along with another one of their tool called "XBundler For Win32/.NET", it promises to have (quote) "DLLs and data files to be embedded inside an application".

Themida sells for eu 200 plus XBundler, selling for eu 120, one can have both for eu 320, which ain't too cheap but not too expensive either.

EXE admirer :-)

Upvotes: 0

Bob Moore
Bob Moore

Reputation: 6894

VB.Net has little in common with VB6. If you want to understand the degree of difference, see http://vb.mvps.org/vfred/breaks.asp

Upvotes: 0

MusiGenesis
MusiGenesis

Reputation: 75386

If I wanted to create a truly standalone Windows EXE application easily, I would use Delphi. Good thing I don't want to do that. .NET is too useful, and (at least version 2.0) is pretty much everywhere already - it's rare that I encounter a client machine without .NET already installed, and even if it isn't there the installer is only 23 MB.

Back in my Visual Basic days, I used to fret about the added burden of having to deploy the VB runtimes along with my application proper. It never ended up being a significant problem.

Upvotes: 1

Corbin March
Corbin March

Reputation: 25734

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

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

Upvotes: 4

Anonymous
Anonymous

Reputation:

So what about VB within Visual Studio 2008 Standard? Was the VB engine rewritten for the .NET platform?

Upvotes: 0

Chris
Chris

Reputation: 28064

VB 6 is not based on the .NET framework. VB**.NET** is.

Upvotes: 0

Charlie
Charlie

Reputation: 45072

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.

Upvotes: 4

Related Questions