Deployment 应用程序无法启动。。。应用程序配置不正确-VC++2005运行时问题 我们将Visual C++ 2003解决方案移到Visual 2005,现在部署XP机器时遇到问题。

Deployment 应用程序无法启动。。。应用程序配置不正确-VC++2005运行时问题 我们将Visual C++ 2003解决方案移到Visual 2005,现在部署XP机器时遇到问题。,deployment,visual-studio-2005,dll,Deployment,Visual Studio 2005,Dll,我们的解决方案有一个DLL项目和一个使用此DLL的命令行可执行文件。这两个项目都创建和嵌入清单文件 我们的安装程序还将VC8 CRT运行时从C:\Program\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\复制到安装目录 当我们在干净的Windows XP上安装时,会看到错误消息应用程序无法启动。。。应用程序配置不正确 将exe放入Depends.exe中,表示: Error: The Side-by-Side confi

我们的解决方案有一个DLL项目和一个使用此DLL的命令行可执行文件。这两个项目都创建和嵌入清单文件

我们的安装程序还将VC8 CRT运行时从C:\Program\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复制到应用程序文件夹就足够了


我做错了什么?

在安装程序中选择Visual Studio 2005合并模块。
如果您使用安装了service pack的visual studio构建了exe/dll,也会发生这种情况。

不建议复制周围的CRT dll。正如Vinay所说,您应该使用正确的合并模块

如果合并模块与安装程序技术不兼容,您也可以使用redist install exe:


作为最后手段,请尝试将整个“Microsoft.VC80.CRT”目录复制到程序的exe目录,而不是内容,即实际目录。

我也遇到了这个问题。我对微软这样对我们感到震惊。 我使用VC6构建了一个特定的项目,然后在构建机器上安装了2003和2005,这导致了我的VC6构建出现问题。我没有检查原始机器上的安装,显然链接器/编译器不知道它在做什么,所以它导致了我的可分发应用程序出现问题。然后我不得不将一个巨大的redist安装文件添加到我的120k exe应用程序中。疯狂的微软

MS在过去几次都把事情搞砸了


您并不真正需要Microsoft的VC80 C运行时库。一团糟

相反,将程序用/MT选项重新链接,静态链接C运行库LabVIEBCM.LIB或C++标准库。要通过项目属性进行设置,请转到

C/C++ -> Code Generation -> Runtime Library: Multi-threaded (/MT)
如果未编译,您可能还需要添加此选项/NODEFAULTLIB:

Linker -> Input -> Ignore Specific Library: msvcrt.lib

请参阅

中的链接选项,我想这不是一个选项,因为我们在安装程序中使用Innosetup。