问题描述
我们将Visual C ++ 2003解决方案转移到Visual 2005,现在我们在部署到XP机器时遇到问题。
We moved our Visual C++ 2003 solution to Visual 2005 and now we have problems deploying to clean XP machines.
我们的解决方案有一个DLL项目和一个命令行可执行文件它使用这个DLL。两个项目都创建和嵌入清单文件。
Our solution has a DLL project and a command line executable which uses this DLL. Both projects create and embed manifest files.
我们的安装程序还会从C:\Programme\Microsoft Visual Studio 8 \VC \\\\\\\\\\\\\\\\\\\\\\\\\\ \x86\Microsoft.VC80.CRT\到安装目录。
Our installer also copies the VC8 CRT runtimes from the C:\Programme\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\ to the install dir.
当我们安装在干净的Windows XP上时,我们看到错误消息应用程序已失败启动...应用程序配置不正确。
When we install on a clean Windows XP, we see the error message "Application has failed to start ... application configuration is incorrect."
将exe放在Depends.exe中,说:
Putting the exe in Depends.exe, says:
Error: The Side-by-Side configuration information for "c:\program files\MySoftware\vc8\BENCHMARK.EXE" contains errors. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem (14001).
Error: The Side-by-Side configuration information for "c:\program files\MySoftware\vc8\MYLIB-VC8.DLL" contains errors. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem (14001).
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.
事件查看器日志:
Dependent Assembly Microsoft.VC80.CRT could not be found and Last Error was The referenced assembly is not installed on your system.
Resolve Partial Assembly failed for Microsoft.VC80.CRT. Reference error message: The referenced assembly is not installed on your system.
Generate Activation Context failed for C:\Program Files\MySoftware\vc8\Benchmark.exe. Reference error message: The operation completed successfully.
$ b .CRT.manifest to application folder is enough。
I've read copying the msvcp80.dll,msvcr80.dll,msvcm80.dll and Microsoft.VC80.CRT.manifest to application folder is sufficient.
我做错了什么?
推荐答案
不建议复制CRT dll。如Vinay所说,您应该使用正确的合并模块。
Copying the CRT dlls around is not recommended. As Vinay says you should use the correct merge modules.
如果合并模块不符合安装技术,您还可以使用redist install exe:
You can also use the redist install exe's if merge modules don't work with your installer technology:
- VS2005 CRT
- VS2005 SP1 CRT
作为最后的手段,请尝试将整个Microsoft.VC80.CRT目录复制到您的程序exe目录(而不是内容,实际目录)。
As a last resort try copying the entire 'Microsoft.VC80.CRT' directory to your programs exe directory (not the contents, the actual directory).
这篇关于应用程序无法启动...应用程序配置不正确 - VC ++ 2005运行时问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!