我们将 Visual C++ 2003 解决方案移至 Visual 2005,现在我们在部署到干净的 XP 机器时遇到了问题。
我们的解决方案有一个 DLL 项目和一个使用该 DLL 的命令行可执行文件。这两个项目都创建和嵌入 list 文件。
我们的安装程序还将 VC8 CRT 运行时从 C:\Programme\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\复制到安装目录。
当我们在干净的 Windows XP 上安装时,我们会看到错误消息“应用程序无法启动...应用程序配置不正确”。
将exe放入Depends.exe中,说:
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.
我已经阅读将 msvcp80.dll、msvcr80.dll、msvcm80.dll 和 Microsoft.VC80.CRT.manifest 复制到应用程序文件夹就足够了。
我究竟做错了什么 ?
最佳答案
不建议复制 CRT dll。正如 Vinay 所说,您应该使用正确的合并模块。
如果合并模块不适用于您的安装程序技术,您还可以使用 redist install exe:
作为最后的手段,尝试将整个“Microsoft.VC80.CRT”目录复制到您的程序 exe 目录(不是内容,实际目录)。
关于deployment - 应用程序无法启动...应用程序配置不正确 - VC++ 2005 运行时问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/265481/