Archive: Can run on computer with VS 2005 installed, but not on other machines :(


Can run on computer with VS 2005 installed, but not on other machines :(
Users get the message:

"This application has failed to start because the application configuration is incorrect. Reinstalling your application may fix the problem."

Does anyone know how to solve this problem?

I'd like to make sure my application runs on 98SE, WinXP Pro etc... any help? Thanks very much in advance!


My apologies...

Its a MFC (no .NET project)... target install base are WinXP computers, but I'd like it to run on 98SE and up. I tried to link everything statically.

The user who tried installing it had WinXP Pro SE installed.

Could the error be that I didn't specify which version of Windows I wanted it to work on in the header files? I.e. I didn't have:
#define WINVER 0x0410
or
#define _WIN32_Windows 0x0410

Would this have fixed it?


(MFC but no .NET, and I tried to link everything statically....) build log follows:
=]=====================================================
Creating temporary file "c:\Documents and Settings\Davids\My Documents\Visual Studio 2005\Projects\Blah\ReleaseW2k\RSP00001D49765820.rsp" with contents
[
/O2 /Ob1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_BUILDING_ON_WIN2K" /D "_AFXDLL" /GF /FD /EHsc /MD /Gy /Yu"stdafx.h" /Fp".\ReleaseW2k/File1.pch" /Fo".\ReleaseW2k/" /Fd".\ReleaseW2k/" /W4 /c /TP ".\File4.cpp"
]
Creating command line "cl.exe @"c:\Documents and Settings\Davids\My Documents\Visual Studio 2005\Projects\Blah\ReleaseW2k\RSP00001D49765820.rsp" /nologo /errorReport:prompt"
Creating temporary file "c:\Documents and Settings\Davids\My Documents\Visual Studio 2005\Projects\Blah\ReleaseW2k\RSP00001E49765820.rsp" with contents
[
/O2 /Ob1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_BUILDING_ON_WIN2K" /D "_AFXDLL" /GF /FD /EHsc /MD /Gy /Yu"stdafx.h" /Fp".\ReleaseW2k/File1.pch" /Fo".\ReleaseW2k/" /Fd".\ReleaseW2k/" /W4 /c /TP ".\File1.cpp"

".\File2.cpp"

".\File6.cpp"
]
Creating command line "cl.exe @"c:\Documents and Settings\Davids\My Documents\Visual Studio 2005\Projects\Blah\ReleaseW2k\RSP00001E49765820.rsp" /nologo /errorReport:prompt"
Creating temporary file "c:\Documents and Settings\Davids\My Documents\Visual Studio 2005\Projects\Blah\ReleaseW2k\RSP00001F49765820.rsp" with contents
[
/OUT:".\ReleaseW2k/MyAppName.exe" /INCREMENTAL:NO /MANIFEST /MANIFESTFILE:".\ReleaseW2k\MyAppName.exe.intermediate.manifest" /PDB:".\ReleaseW2k/File1.pdb" /SUBSYSTEM:WINDOWS /MACHINE:X86 shell32.lib kernel32.lib user32.lib

".\ReleaseW2k\File3.obj"

".\ReleaseW2k\File4.obj"

".\ReleaseW2k\File5.obj"

".\ReleaseW2k\File6.obj"

".\ReleaseW2k\File2.obj"

".\ReleaseW2k\File7.obj"

".\ReleaseW2k\StdAfx.obj"

".\ReleaseW2k\File1.obj"

".\ReleaseW2k\File1.res"
]
Creating command line "link.exe @"c:\Documents and Settings\Davids\My Documents\Visual Studio 2005\Projects\Blah\ReleaseW2k\RSP00001F49765820.rsp" /NOLOGO /ERRORREPORT:PROMPT"
Creating temporary file "c:\Documents and Settings\Davids\My Documents\Visual Studio 2005\Projects\Blah\ReleaseW2k\RSP00002049765820.rsp" with contents
[
/outputresource:".\ReleaseW2k\MyAppName.exe;#1" /manifest

".\ReleaseW2k\MyAppName.exe.intermediate.manifest"
]
Creating command line "mt.exe @"c:\Documents and Settings\Davids\My Documents\Visual Studio 2005\Projects\Blah\ReleaseW2k\RSP00002049765820.rsp" /nologo"
Creating temporary file "c:\Documents and Settings\Davids\My Documents\Visual Studio 2005\Projects\Blah\ReleaseW2k\BAT00002149765820.bat" with contents
[
@echo Manifest resource last updated at %TIME% on %DATE% > ".\ReleaseW2k\mt.dep"
]
Creating command line """c:\Documents and Settings\Davids\My Documents\Visual Studio 2005\Projects\Blah\ReleaseW2k\BAT00002149765820.bat"""


A quick Google search shows it may be due to malformed manifest file. There's an article in MSDN about manifest files. You should try asking this question in a more appropriate forum where you'd probably get more response.


In each project: Embed Manifest File
In each of VS 2005 MFC projects, you need to embed the manifest file. In the solutions explorer: right-click on the project and go to properties. I don't remember exactly where the setting is (perhaps under Linker), but you need to make sure the Embed Manifest setting is enabled in each of your projects that you redist. On my VS 2005 MFC app when I failed to embed the manifest in one or more dlls (even though it was in the .exe), I would get the dreaded and horribly cryptic "failed to start" error.