由于不正确的清单,并排配置不正确

Side-by-Side configuration incorrect due to incorrect manifest

本文关键字:不正确 配置      更新时间:2023-10-16

我最初在libRocket论坛上问过这个问题,但考虑到进一步的调查表明这更像是一个通用的c++/Visual Studio相关问题,我在这里问。

我正在运行Visual Studio c++ 2010 Express,并下载了完整的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.

我发现这很奇怪,因为它也显示了我的应用程序和RocketCore_d.dll依赖于MSVCP100D.DLL和MSVCR100D.DLL。没有错配。然后我执行了sxstrace:

=================
Begin Activation Context Generation.
Input Parameter:
    Flags = 0
    ProcessorArchitecture = Wow32
    CultureFallBacks = en-US;en
    ManifestPath = BinariesDebugRocketCore_d.dll
    AssemblyDirectory = BinariesDebug
    Application Config File = 
-----------------
INFO: Parsing Manifest File BinariesDebugRocketCore_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:WindowsassemblyGAC_32Microsoft.VC90.DebugCRT9.0.21022.8__1fc8b3b9a1e18e3bMicrosoft.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:WindowsassemblyGAC_32Microsoft.VC90.DebugCRT9.0.21022.8__1fc8b3b9a1e18e3bMicrosoft.VC90.DebugCRT.DLL.
                INFO: Attempt to probe manifest at BinariesDebugMicrosoft.VC90.DebugCRT.DLL.
                INFO: Attempt to probe manifest at BinariesDebugMicrosoft.VC90.DebugCRT.MANIFEST.
                INFO: Attempt to probe manifest at BinariesDebugMicrosoft.VC90.DebugCRTMicrosoft.VC90.DebugCRT.DLL.
                INFO: Attempt to probe manifest at BinariesDebugMicrosoft.VC90.DebugCRTMicrosoft.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 Studio 2008运行时。这是正确的吗?实际上,我的系统上已经安装了VS2008的9.0.21022版本。但即便如此,考虑到我使用VS2010重新编译libRocket,它不应该引用VS2010运行时吗?

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

    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC90.DebugCRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b">    </assemblyIdentity>
    </dependentAssembly>

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

注意这个问题只发生在调试模式下,它在发布版中运行得很好。我当然非常希望能够在我的开发系统上以调试模式运行它。

任何关于如何解决这个问题的指针非常感激!

谢谢!

不应该引用VS2010运行时吗?

不,VS2010不再在并行缓存中存储CRT。它回到c:windowssystem32中,不需要清单就可以找到它。微软公司在收到了很多客户的投诉后改变了主意,他们都遇到了和你一样的问题。

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

这是你的核心问题。您的程序不仅依赖于旧版本的CRT,而且还是错误的版本。CRT的调试版本不能部署,只能在安装了VS2008的机器上工作。像你这样的。

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

解决您的问题@ SideBySide错误

只复制应用程序调试文件夹中版本的dll和manifest文件。