I will make a "release" of a project I have done in VC++ 2008 Express Edition.
I go to: Project/Form1 properties.

Here I choose: Configuration: Release
In the General tab, I choose: Output Directory C:\Release & Intermediate Directory: C:\Release.
In Debugging tab I choose: Command: C:\Release

Now I press "Apply" and "OK" and press F7(Build Solution)
It creates 25 files in the "C:\Release", (I have 4 Forms in the application)

Now when doing a setup, wich files is needed for the setup of these ?
I dont beleive all of them is needed ?

Form1 (Precompiled Header File)
stdafx(Object File)
vc90(VC++ Minimum Rebuild Dependencies)
vc90 (Program Debug Database)
AssemblyInfo(Object File)
Form1(Object File)
Form2(Object File)
Form3(Object File)
Form4(Object File)
app(RES File)
Form1 (Incremental Linker File)
Form1 (Program Debug Database)

You only need one file -- the *.exe file. All the other files you see are just integmediate files used by the linker to build the *.exe file. You could have easily tested this yourself by copying the *.exe file somewhere else and executing it from Windows Explorer.

Thank you.. I think it is much better to ask this question as it could have worked on XP to just copy the .exe file and on any other system, could have needed any other file.
Possible and unknown scenarios.

In that case I dont really understand the difference between release and dubug mode if only the .exe file is needed. Why not only take that file from the debugfolder ?

I will test this, thanks for help.

You can't use the debug version because (1) its size is at least twice the that of the release version, and (2) it contains alls to the debug version of Windows DLLs which other computers most likely do not have unless they also have the compiler installed.

Your orinal question did not ask about other DLLs that may be needed on another computer, you only asked about the files that are in the Release folder.

For other files, download from this link

>> 1. You can't use the debug version because (1) its size is at least twice the that of the release version,
>> 2. it contains alls to the debug version of Windows DLLs which other computers most likely do not have unless they also have the compiler installed.

(Yes ofcourse, I only asked about the ones in the release folder, no DLL:s)

1. I have to ask. As you said that the .exe file in the debug folder could be twice the size of the one in the release folder. In this case how I did this release, these 2 files have the exact same size, the .exe file in the debug folder and the .exe file in the release folder ? I have choosen release as configuration and described in the first post.

2. Then you mentioned that the debug file contains the debug versions of Windows DLL which other computer most likely dont have and this is why a release is needed.
This is a problem I had before where, I have automatically donwloaded the whole .NET framwork 3.5 to the users computer that also is 200 MB in size.
I think this is wrong but this is an answer I had from here before to be the solution for this problem.
I found on a post that the 4 DLL files that is in this folder "Microsoft.VC90.CRT" could be included in the setup to solve this problem but I dont know if this is correct to do..

But now that solution and the thing you mentioned where the release perheps should take care of that problem automatically confuses me a bit.

It seems that my release is not correct ? Thanks

2. You misunderstood me. I said the debug version requires debug version of Windows DLLs that other computer most likely do not have.

My computer (Windows 7) does not have a folder called Microsoft/CRT. I am using the Express version of vc++ 2010. If you have the Pro or better version then the compiler's install directory may alreay have to redistributable files that I gave the link to in my previous post.


Yes I understood that the debug version did require debug versions of the Windows DLL:s that other computers might not have. I think this is exactly where my problems are, that these are not included in the .exe file that I create in the release.

I have to tell what I have done as I really have a problem to get this right. I have done a release in vc++ 2008 Express Edition and tried to install it on XP and Windows 7 just now. I tried it now and also included the .DLLs in that "Microsoft.VC90.CRT" folder (msvcm90.dll, msvcp90.dll, msvcr90.dll, Microsoft.VC90.CRT.manifest)

I get this error when trying to exectute the installed .exe file on Windows 7:
"The application has failed to start because its side-by-side configuration is incorrect. Please
see the application event log or use the command-line sxstrace.exe tool for more detail."

I am back to wonder about that this release .exe file has the same size as the one in the debugfolder which seems wrong ?

Then I also wonder if I should upgrade and instead use vc++ 2010 Express Edition. I wonder if this will solve the problem and can I convert the project just like that in that new version ?

I found a post by you with exact this problem that I have here:

You mention the .DLL files that should be in the same folder as the .exe. This is exactly what I have done but that did not help.
You mention that those .DLL will not help in that case.
Then the question is, how is this possible to do, how will I do a setup that simply works on another computer ?

I also now tried to install this setup file with the .exe from the release together with the .DLL files(Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT) on a XP computer just now that does not have the VC++ 2008 Express edition installed.

I get this error message when executing the application:
"this application has failed to start because the application configuration is incorrect"

I have difficult to beleive that a user have to install the whole .NET framework(http://download.microsoft.com/download/6/0/f/60fc5854-3cb8-4892-b6db-bd4f42510f28/dotnetfx35.exe) in order for the application to work. It is 197 MB ?

If I understand correct, the only thing that is needed is the .exe file that the release is creating but that does not work ?

I have now also tried to install the vcredist_x86.exe on the XP machine that doesn´t have VC++ Express Edition installed.

I have tried to install both the 2008 and 2010 package seen below on the machine and that does not help. I receive the below error message when trying to execute the .exe release build:
"this application has failed to start because the application configuration is incorrect"
It is just impossible to find an answer to this. I have googled many days regarding this problem.

I have tried to install both these files with no success:
(Microsoft Visual C++ 2008 Redistributable Package (x86))

(Microsoft Visual C++ 2010 Redistributable Package (x86))

Thank you, I have red the whole thread you sent. I have found this one before too.

This is really a big issue how to solve this. As seen in that thread this is not an easy thing to understand what really is needed to do, there is no real answer in that thread. It is to diffus.

So I need to take this from the beginning.

I have done a Form application in VC++ 2008 Express Edition. I have done a release .exe file of this application.
(This release file has the same size 10.3 MB as the debug .exe file 10.3 MB)

The release .exe file generates this error on a XP computer wihtout VC++:
"this application has failed to start because the application configuration is incorrect"

So what more is needed here?
I have tried to put all of these files in the very SAME folder as the .exe file on the XP computer without VC++ but that does not solve the problem.
I have taken almost all .dll files that is mentioned in that long thread from the previous post.
There must be a step by step method of how you do this as it is a complex problem?


>> http://www.ferdychristant.com/blog//articles/DOMM-6XPRW9

I found this article that says this:
1. In the project properties Window, section C/C++ ->Code generation, set the "Runtime library" value to "Multi-threaded (/MT)" for the release configuration (upper left dropdown), and "Multi-threaded Debug (/MTd)" for the debug configuration.
2. Next, rebuild the application, by right-clicking on the project in the solution explorer, and chosing "Rebuild".
3. Ship the dependable glut32.dll and opengl32.dll together with the release .exe file to make the .exe portable.

When trying to rebuild the application, I receive this error:
'/MT' and '/clr:pure' command-line options are incompatible

I belevie this is close to be the solution, perheps some other additional settings is needed?
I have googled this error but cant really find what it means or a solution to this.

I have done some progress and wonder if this is enough and correct:

This is what I have done:
In Project/Properties/C/C++/Code Generation/Runtime Library, I have put those settings which DO compiles:

Multi-threaded DLL (/MD)
Debug: Multi-threaded Debug (/MTd)

When I do this the debug.exe file will be 10.3 MB and the release is 10.1 MB(less in size).

This .exe file actually DO run on the XP computer that doesn´t have VC++ 2008 Express Edition installed.

Is this correctly done ?