2008-11-05 53 views
7

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

我们的解决方案有一个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到应用程序文件夹就足够了。

我在做什么错?

回答

5

不推荐复制CRT dll。正如Vinay说你应该使用正确的合并模块。

您还可以使用的REDIST如果合并模块不与您的安装技术合作安装的exe:

作为最后的手段尝试复制整个“ Microsoft.VC80.CRT'目录到你的程序的exe目录(不是内容,实际目录)。

2

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

+0

我想这不是一个选项,因为我们使用Innosetup作为我们的安装程序。 – 2008-11-07 12:41:02

2

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

http://www.microsoft.com/downloads/details.aspx?familyid=200B2FD9-AE1A-4A14-984D-389C36F85647&displaylang=en

4

你并不真的需要微软的VC80 C运行时库。这是一个烂摊子。

相反,用/ MT选项重新链接你的程序,这个静态链接c运行时库(libcmt.lib)或C++标准库。要通过项目属性设置,请转到

C/C++ -> Code Generation -> Runtime Library: Multi-threaded (/MT) 

如果不能编译,您可能希望增加该选项以及(/ NODEFAULTLIB :)

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

请参阅从链接选项http://msdn.microsoft.com/en-us/library/abx4dbyh(VS.80).aspx

相关问题