首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >由于清单不正确,并行配置不正确

由于清单不正确,并行配置不正确
EN

Stack Overflow用户
提问于 2011-12-23 20:20:31
回答 2查看 18.2K关注 0票数 14

我最初是在libRocket论坛上问这个问题的,但进一步的调查表明这是一个与C++/Visual Studio相关的更普遍的问题,所以我在这里提问。

我正在运行Visual Studio C++ 2010Express,并且已经将完整的Win32源代码下载到libRocket 1.2.1。我已经成功地在调试模式下编译了它,没有出现错误或警告,现在正在尝试让它在我的应用程序中运行,该应用程序构建在SFML 1.6之上。

对于重新编译的libRocket,我的应用程序编译时没有出现错误或警告。但是,只要我尝试运行它,就会收到一条错误消息,显示为The application was unable to start correctly (0xc0150002). Click OK to close the application.

当我使用Dependency Walker打开我的可执行文件时,我得到了以下错误:

Error: The Side-by-Side configuration information for "ROCKETCORE_D.DLL" contains errors. The application has failed to start because its side-by-side configuration is incorrect.

我觉得这很奇怪,因为它还显示了我的应用程序和依赖于MSVCP100D.DLL和MSVCR100D.DLL的RocketCore_d.dll,没有不匹配的地方。所以我执行了一个sxstrace

代码语言:javascript
复制
=================
Begin Activation Context Generation.
Input Parameter:
    Flags = 0
    ProcessorArchitecture = Wow32
    CultureFallBacks = en-US;en
    ManifestPath = Binaries\Debug\RocketCore_d.dll
    AssemblyDirectory = Binaries\Debug\
    Application Config File = 
-----------------
INFO: Parsing Manifest File Binaries\Debug\RocketCore_d.dll.
    INFO: Manifest Definition Identity is (null).
    INFO: Reference: Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"
INFO: Resolving reference Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
    INFO: Resolving reference for ProcessorArchitecture WOW64.
        INFO: Resolving reference for culture Neutral.
            INFO: Applying Binding Policy.
               INFO: No publisher policy found.
                INFO: No binding policy redirect found.
            INFO: Begin assembly probing.
                INFO: Did not find the assembly in WinSxS.
                INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC90.DebugCRT\9.0.21022.8__1fc8b3b9a1e18e3b\Microsoft.VC90.DebugCRT.DLL.
                INFO: Did not find manifest for culture Neutral.
            INFO: End assembly probing.
    INFO: Resolving reference for ProcessorArchitecture x86.
        INFO: Resolving reference for culture Neutral.
            INFO: Applying Binding Policy.
                INFO: No publisher policy found.
                INFO: No binding policy redirect found.
            INFO: Begin assembly probing.
                INFO: Did not find the assembly in WinSxS.
                INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC90.DebugCRT\9.0.21022.8__1fc8b3b9a1e18e3b\Microsoft.VC90.DebugCRT.DLL.
                INFO: Attempt to probe manifest at Binaries\Debug\Microsoft.VC90.DebugCRT.DLL.
                INFO: Attempt to probe manifest at Binaries\Debug\Microsoft.VC90.DebugCRT.MANIFEST.
                INFO: Attempt to probe manifest at Binaries\Debug\Microsoft.VC90.DebugCRT\Microsoft.VC90.DebugCRT.DLL.
                INFO: Attempt to probe manifest at Binaries\Debug\Microsoft.VC90.DebugCRT\Microsoft.VC90.DebugCRT.MANIFEST.
                INFO: Did not find manifest for culture Neutral.
            INFO: End assembly probing.
   ERROR: Cannot resolve reference Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
ERROR: Activation Context generation failed.
End Activation Context Generation.

我的系统似乎缺少Visual Studio2008运行时。这是正确的吗?事实上,我的系统上已经安装了9.0.21022版的VS2008 redistributable。但即便如此,考虑到我使用VS2010重新编译了libRocket,它不应该引用VS2010运行时吗?

我认为这个错误源于新编译的libRocket的清单文件中的配置:

代码语言:javascript
复制
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC90.DebugCRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b">    </assemblyIdentity>
    </dependentAssembly>

我可以看到它来自哪里,因为应用程序最初是为VS2008编写的,但是我如何让VS2010生成正确的清单呢?项目属性表明它是自动生成的。

请注意,此问题仅在调试模式下出现,它在版本中运行良好。当然,我非常希望能够在我的开发人员系统上以调试模式运行它。

任何关于如何解决这个问题的建议都非常感谢!

谢谢!

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2011-12-27 01:03:37

不应该引用VS2010运行时吗?

不,VS2010不再将CRT存储在并排缓存中。它位于c:\windows\system32中,不需要任何清单即可找到它。微软在收到太多客户的投诉后改变了主意,这些客户正在努力解决你遇到的这种问题。

<assemblyIdentity type="win32" name="Microsoft.VC90.DebugCRT" .../>

这是你的核心问题。您的程序不仅依赖于旧版本的CRT,而且它也是错误的版本。调试版的CRT无法部署,只能在安装了VS2008的计算机上运行。就像你一样。

你肯定需要解决这个问题,除了部署问题,混用CRT版本还会导致更多的问题。您正在链接使用调试配置中的VS2008生成的.obj或.lib。您需要找到生成该文件的项目并重新构建它,以便它使用正确的配置和CRT版本。如果您不知道,那么您可以grep .obj和.lib文件中的"DebugCRT“。

票数 22
EN

Stack Overflow用户

发布于 2013-09-19 13:19:39

问题的解决方案@ SideBySide Error

只需复制应用程序调试文件夹中各个版本的dll和清单文件即可。

票数 -3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/8616001

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档