本文介绍了安装较新版本的C ++重新分发后,C ++应用程序不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 My C ++应用程序使用共享运行时程序集9.0.30729.1在Windows XP上运行。但最近我安装了新的C ++重新分发软件包,它部署了更新版本的运行时程序集版本9.0.30729.6161。 在Winsxs \policies目录中,这个新的策略文件也是由新的C ++重新分发包部署。 <? xml 版本 = 1.0 encoding = UTF-8 standalone = yes ? > <! - 版权所有(c)Microsoft Corporation。版权所有。 - > < 程序集 xmlns = urn:schemas-microsoft-com:asm.v1 manifestVersion = 1.0 > < assemblyIdentity type = win32 -policy name = policy.9.0.Microsoft.VC90.ATL 版本 = 9.0.30729.6161 processorArchitecture = x86 publicKeyToken = 1fc8b3b9a1e18e3b / > < 依赖 > < dependentAssembly > ; < assemblyIdentity type = win32 name = Microsoft.VC90.ATL processorArchitecture = x86 publicKeyToken = 1fc8b3b9a1e18e3b / > < bindingRedirect oldVersion = 9.0.20718.0-9.0.21022.8 newVersion = 9.0.30729.6161 / > < bindingRedirect oldVersion = 9.0.30201.0-9.0.30729.6161 newVersion = 9.0.30729.6161 / > < / dependentAssembly > < / dependency > < / assembly > 在这个新的Visual C ++ 2008 Redistributable安装之后,我的程序显示此应用程序已失败因为应用程序配置不正确而启动错误。但如果我删除上面的政策文件,它工作正常。有什么想法?解决方案 看起来安装程序用6161覆盖了1 9.0 .30729.1 9.0.30729.6161 我的解决方案是使用静态链接来避免这种混乱。 您可以在应用程序的清单文件中调整此容差。我会让你追逐MSDN。 如果您使用外部清单文件,您可以修复现有的应用程序,而无需使用重定向技术重新编译此处 [ ^ ]。 My C++ application was running on windows XP using shared run-time assemblies version 9.0.30729.1. But recently I installed new C++ redistribute package and it deployed newer version of run-time assemblies version 9.0.30729.6161.In Winsxs\policies directory this new policy file also deployed by new C++ redistribute package.<?xml version="1.0" encoding="UTF-8" standalone="yes"?><!-- Copyright (c) Microsoft Corporation. All rights reserved. --><assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"><assemblyIdentity type="win32-policy" name="policy.9.0.Microsoft.VC90.ATL" version="9.0.30729.6161" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"/><dependency><dependentAssembly><assemblyIdentity type="win32" name="Microsoft.VC90.ATL" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"/><bindingRedirect oldVersion="9.0.20718.0-9.0.21022.8" newVersion="9.0.30729.6161"/><bindingRedirect oldVersion="9.0.30201.0-9.0.30729.6161" newVersion="9.0.30729.6161"/></dependentAssembly></dependency></assembly>After this new Visual C++ 2008 Redistributable installation my program shows "This Application Has Failed to Start Because the Application Configuration Is Incorrect" error. But if I delete above policy file it works fine. Any idea? 解决方案 Looks like the installer overwrote the "1" with "6161"9.0.30729.19.0.30729.6161My solution is to use static linking to avoid such mess.You can adjust the tolerance to this in the manifest file(s) for your application. I''ll let you chase MSDN for this.If you use external manifest files, you can fix your existing app without recompiling with the ''redirect'' technique which is described here[^]. 这篇关于安装较新版本的C ++重新分发后,C ++应用程序不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-27 12:53