Runtime error, possibly related to Visual Studio redist...
Hello all,
When I try to run my program on a machine that isn't the one I built on, I get the following error:
This application failed to start because the application configuration is incorrect. Reinstalling the application may fix the problem.
I checked the project property pages, and I am generating a manifest file (/MANIFEST), and I am embedding the manifest (the option is set to Yes). So, my understanding of it is that I shouldn't be getting this error, but maybe I'm wrong.
I have another application that runs just fine. I tried to look for any obvious differences between the two in the property pages, but couldn't really find anything. The one that works is an MFC app. I don't know if that makes a difference.
Anyway, I also tried opening both apps in depends.exe, and sure enough, the app that works is able to find MSVCP90.DLL (and others), and the app that doesn't work can't find it.
Thank you.
Edit: I should mention that I'm using Visual Studio 2009, programming in C++
[Edited by - ApochPiQ on November 12, 2009 3:51:32 PM]
Can you post the contents of both manifest files? You should be able to find them in the intermediates folder (where all your .obj files etc. go) named something like foo.embed.manifest.
Hmmm, strangely enough, I cannot find a foo.embed.manifest for the non-working app. I can only find a foo.intermediate.manifest for it.
I do have the Embed Manifest option set to Yes, though. Here is what I have under Configuration Properties => Manifest Tool => Input and Output:
And here is what I have under Configuration Properties => Linker => Manifest File:
Here are those same options, for the MFC app (the one that works):
Configuration Properties => Manifest Tool => Input and Output:
Configuration Properties => Linker => Manifest File:
Note that they are identical, at least on these two property pages.
But curiously enough, I can find the *.embed.manifest for the MFC app (the one that works) but not the app that doesn't work.
Just in case, here is the *.intermediate.manifest for the app that doesn't work (sorry about the lack of source boxes; I tend to have trouble with those when using languages that the source box does not support):
Here is the *.intermediate.manifest for the app that does work:
And here is the *.embed.manifest for the app that does work:
I do have the Embed Manifest option set to Yes, though. Here is what I have under Configuration Properties => Manifest Tool => Input and Output:
Additional Manifest Files: (blank)Input Resource Manifests: (blank)Embed Manifest: YesOutput Manifest File: $(IntDir)\$(TargetFileName).embed.manifestManifest Resource File: $(IntDir)\$(TargetFileName).embed.manifest.resGenerate Catalog Files: NoDependency Information File: $(IntDir)\mt.dep
And here is what I have under Configuration Properties => Linker => Manifest File:
Generate Manifest: YesManifest File: $(IntDir)\$(TargetFileName).intermediate.manifestAdditional Manifest Dependencies: (blank)Allow Isolation: YesEnable User Account Control (UAC): YesUAC Execution Level: asInvokerUAC Bypass UI Protection: No
Here are those same options, for the MFC app (the one that works):
Configuration Properties => Manifest Tool => Input and Output:
Additional Manifest Files: (blank)Input Resource Manifests: (blank)Embed Manifest: YesOutput Manifest File: $(IntDir)\$(TargetFileName).embed.manifestManifest Resource File: $(IntDir)\$(TargetFileName).embed.manifest.resGenerate Catalog Files: NoDependency Information File: $(IntDir)\mt.dep
Configuration Properties => Linker => Manifest File:
Generate Manifest: YesManifest File: $(IntDir)\$(TargetFileName).intermediate.manifestAdditional Manifest Dependencies: (blank)Allow Isolation: YesEnable User Account Control (UAC): YesUAC Execution Level: asInvokerUAC Bypass UI Protection: No
Note that they are identical, at least on these two property pages.
But curiously enough, I can find the *.embed.manifest for the MFC app (the one that works) but not the app that doesn't work.
Just in case, here is the *.intermediate.manifest for the app that doesn't work (sorry about the lack of source boxes; I tend to have trouble with those when using languages that the source box does not support):
<?xml version='1.0' encoding='UTF-8' standalone='yes'?><assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level='asInvoker' uiAccess='false' /> </requestedPrivileges> </security> </trustInfo> <dependency> <dependentAssembly> <assemblyIdentity type='win32' name='Microsoft.VC90.CRT' version='9.0.21022.8' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' /> </dependentAssembly> </dependency> <dependency> <dependentAssembly> <assemblyIdentity type='win32' name='Microsoft.VC90.DebugCRT' version='9.0.21022.8' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' /> </dependentAssembly> </dependency></assembly>
Here is the *.intermediate.manifest for the app that does work:
<?xml version='1.0' encoding='UTF-8' standalone='yes'?><assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level='asInvoker' uiAccess='false' /> </requestedPrivileges> </security> </trustInfo> <dependency> <dependentAssembly> <assemblyIdentity type='win32' name='Microsoft.VC90.CRT' version='9.0.21022.8' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' /> </dependentAssembly> </dependency> <dependency> <dependentAssembly> <assemblyIdentity type='win32' name='Microsoft.VC90.MFC' version='9.0.21022.8' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' /> </dependentAssembly> </dependency></assembly>
And here is the *.embed.manifest for the app that does work:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assemblyIdentity version="1.0.0.0" processorArchitecture="X86" name="Microsoft.Windows.SAD" type="win32"> </assemblyIdentity> <description>Your app description here</description> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*"> </assemblyIdentity> </dependentAssembly> </dependency> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"> </assemblyIdentity> </dependentAssembly> </dependency> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.VC90.MFC" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"> </assemblyIdentity> </dependentAssembly> </dependency> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="asInvoker" uiAccess="false"> </requestedExecutionLevel> </requestedPrivileges> </security> </trustInfo></assembly>
The plot thickens...
The computers I'm trying to run the app on already have the redistributable installed (Microsoft Visual C++ 2008 Redistributable - x86 9.0.21022).
The computers I'm trying to run the app on already have the redistributable installed (Microsoft Visual C++ 2008 Redistributable - x86 9.0.21022).
If I open the executable with Notepad++ this is what I see (an older build, because I have to use another computer for the moment, but the build should be identical):
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel> </requestedPrivileges> </security> </trustInfo> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity> </dependentAssembly> </dependency> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.VC90.DebugCRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity> </dependentAssembly> </dependency></assembly>
The main thing I see is that your non-working app references the Debug CRT, which as far as I know is not part of the standard Visual Studio redist packages. Unless you have done something with referencing debug .libs in your non-working project, my guess is that you're trying to run a Debug build on the other machine rather than a Release.
Nah it's release, but this app has such a complex web of dependencies it's very possible that there was a debug lib thrown in there. I'll check tomorrow, thanks.
Yep, someone set the project up to link to the debug tinyxml library. Thanks again for your help!
Glad you got it sussed out [smile]
Slightly off-topic - please don't mark threads as "solved" in the General Programming forum, as that can discourage further useful contributions to the discussion.
Thanks and good luck! [smile]
Slightly off-topic - please don't mark threads as "solved" in the General Programming forum, as that can discourage further useful contributions to the discussion.
Thanks and good luck! [smile]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement