Console App won't run, getting error about "application configuration is incorrect"

Hello,

I have a console app created using C++ 2005 Express. I now need to copy it to another machine to use it but it won't run. I have already copied the msvcr80.dll in with the executable but still does not work. I have also try copying in the manifest but this has no effect. What do I need to do to get my console app to run on another machine?

Thank you for your help,

[378 byte] By [DigitalOne] at [2008-2-16]
# 1
You can look at it with DLLexp
and then copy all the dll it lists.
hackwrench at 2007-9-8 > top of Msdn Tech,Visual Studio Express Editions,Visual C++ 2005 Express Edition...
# 2

The link you listed seems to be dead.

DigitalOne at 2007-9-8 > top of Msdn Tech,Visual Studio Express Editions,Visual C++ 2005 Express Edition...
# 3
Works for me.
hackwrench at 2007-9-8 > top of Msdn Tech,Visual Studio Express Editions,Visual C++ 2005 Express Edition...
# 4
What error message do you get?
If a file is missing use DEPENDS.EXE to check all dependencies!
MartinRichter at 2007-9-8 > top of Msdn Tech,Visual Studio Express Editions,Visual C++ 2005 Express Edition...
# 5
The error message is "The application has failed to start because the "application configuration is incorrect". Reinstalling the application may fix this problem"

Could there be something wrong with the manifest?

DigitalOne at 2007-9-8 > top of Msdn Tech,Visual Studio Express Editions,Visual C++ 2005 Express Edition...
# 6

Here is some more background. I had originally developed the console app in Beta 2. I recently uninstalled it and installed the final version. I noticed that the manifest that is created still has an old version number (i.e. 8.0.50608.0) in it. How can I get it to output the new version number (i.e. 8.0.50727.42). I currently have copied the new version of the dll. I have tried editing the manifest but it does not help. I really don't want to use the beta version anymore so what can I do?

See below for my manifest as created by VS C++ 2005

<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
</dependentAssembly>
</dependency>
</assembly>

DigitalOne at 2007-9-8 > top of Msdn Tech,Visual Studio Express Editions,Visual C++ 2005 Express Edition...
# 7
Have you actually recompiled your app with the non-beta VC++ 2005 Express?
hackwrench at 2007-9-8 > top of Msdn Tech,Visual Studio Express Editions,Visual C++ 2005 Express Edition...
# 8
Yes
DigitalOne at 2007-9-8 > top of Msdn Tech,Visual Studio Express Editions,Visual C++ 2005 Express Edition...
# 9
The number you are getting 50608 is the correct one.The policy on your machine will direct such dependency to the correct version.

You need to install the SxS binaries into the other machine. http://msdn2.microsoft.com/en-us/library/ms235624.aspx includes more details. Also, the following previous post might be helpful: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=123250&SiteID=1

Thanks,
Ayman Shoukry
VC++ Team

AymanShoukry at 2007-9-8 > top of Msdn Tech,Visual Studio Express Editions,Visual C++ 2005 Express Edition...
# 10
Is it possible in VC++ EE to create a simple Hello World console application
(i.e. a .exe file) that does not require the installation of other stuff?

It seems to me that this is not possible in this free product.

What about the commercial product? When I install a Windows program, they
tend to have a lot of auxiliary files and stuff and was wondering if this was
inherent in the platform.

woodland30033 at 2007-9-8 > top of Msdn Tech,Visual Studio Express Editions,Visual C++ 2005 Express Edition...
# 11
If you want to create a simple program that does not require any other files then you can still statically link to the C and C++ runtime. To use the static libraries you need to go to Properties - Configuration Properties - C/C++ - Code Generation - Runtime Library and select either "Multi-threaded (/MT)" or "Multi-threaded Debug (/MTd)"
JonathanCaves-MSFT at 2007-9-8 > top of Msdn Tech,Visual Studio Express Editions,Visual C++ 2005 Express Edition...
# 12
Jonathan Caves - MSFT wrote:
If you want to create a simple program that does not require any other files then you can still statically link to the C and C++ runtime. To use the static libraries you need to go to Properties - Configuration Properties - C/C++ - Code Generation - Runtime Library and select either "Multi-threaded (/MT)" or "Multi-threaded Debug (/MTd)"

This worked! Thanks!

woodland30033 at 2007-9-8 > top of Msdn Tech,Visual Studio Express Editions,Visual C++ 2005 Express Edition...