“应用程序配置不正确”和“并排配置不正确”运行 VS2008 64 位调试构建

发布于 2024-12-28 09:52:22 字数 2089 浏览 2 评论 0原文

我正在使用 64 位操作系统 Windows 7 Ultimate 机器 VS2008 和 64 位插件进行工作。

我已经在 32 和 32 中成功构建了我的项目。 64 位,调试和发布配置。 64 位调试未启动;它给出了错误:

无法启动程序 xxx 由于应用程序配置不正确,该应用程序无法启动。检查清单文件是否存在可能的错误。重新安装应用程序可能会解决此问题。有关更多零售信息,请参阅应用程序事件日志。

我运行了依赖步行者。 从可再发行路径 C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\redist\Debug_NonRedist\amd64\Microsoft.VC90.DebugCRT 我添加了 Microsoft.VC90.DebugCRT.manifest msvcm90d msvcp90d MSVCR90D Microsoft.VC90.DebugOpenMP vcomp90d.sll 在我的解决方案的 bin\debug 文件夹中。

最后,dependency walker 没有留下任何黄色标记(丢失文件),但它仍然给出了如下错误:

错误:至少未找到所需的隐式或转发依赖项。 错误:由于隐式依赖模块中缺少导出函数,至少有一个模块存在未解析的导入。 错误:发现具有不同 CPU 类型的模块。 错误:“e:\xyz.EXE”中的并排配置信息包含错误。应用程序无法启动,因为其并行配置不正确。请查看应用程序事件日志或使用命令行 sxstrace.exe 工具了解更多详细信息 (14001)。

32 位清单显示:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
      </requestedPrivileges>
    </security>
  </trustInfo>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC90.DebugCRT" version="9.0.21022.8" **processorArchitecture="x86"** publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
</assembly>

而 64 位调试清单显示:

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

我不明白的是,为什么调试 32 位构建运行成功?

请帮助我,因为我已经检查了很多问题,但还没有找到任何可行的解决方案。

I am working on a 64-bit OS windows 7 ultimate machine VS2008 with 64bit addon.

I have successfully build my projects in both 32 & 64 bit, debug and release config.
The 64 bit debug is not launching; it gives the error:

Unable to Start program xxx
This application has failed to start because application configuration is incorrect. Review the manifest file for possible errors. Reinstalling the application may fix this problem. For more retails see application event log.

I ran the dependency walker.
From the redistibutable path C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\redist\Debug_NonRedist\amd64\Microsoft.VC90.DebugCRT
I added
Microsoft.VC90.DebugCRT.manifest
msvcm90d
msvcp90d
msvcr90d
Microsoft.VC90.DebugOpenMP
vcomp90d.sll
in the bin\debug folder of my solution.

Finally dependency walker didnt have any yellow marks (missing files) left, but still it gave errors like:

Error: At least one required implicit or forwarded dependency was not found.
Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Error: Modules with different CPU types were found.
Error: The Side-by-Side configuration information in "e:\xyz.EXE" contains errors. The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail (14001).

The 32 bit manifest says:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
      </requestedPrivileges>
    </security>
  </trustInfo>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC90.DebugCRT" version="9.0.21022.8" **processorArchitecture="x86"** publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
</assembly>

Whereas the 64 bit debug manifest has:

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

What I fail to understand is, why does the debug 32-bit build run successfully?

Please help me out as I have already checked many questions but have not found any feasible solution.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

幸福丶如此 2025-01-04 09:52:23

感谢您回答我的问题。我终于解决了这个问题,这是解决方案: -

我的是一个基于 Qt 的 VC++ 解决方案,该应用程序依赖于一些第 3 方 dll 和 DLL。库。
我的任务是为我的应用程序提供 64 位支持,我已在 64 位操作系统中构建了 Qt 和第 3 方 dll 和库。

当我尝试在调试 64 位配置中运行我的应用程序时,出现了 CRT 错误。即使我将以下 CRT 复制到应用程序的 bin 文件夹

redist\Debug_NonRedist\amd64\Microsoft.VC90.DebugCRT 后,该错误仍然存​​在:

  1. Microsoft.VC90.DebugCRT.manifest
  2. msvcm90d.dll
  3. msvcp90d.dll
  4. msvcr90d.dll

Microsoft.VC90.DebugOpenMP

  1. vcomp90d.dll

当我将上述 CRT 粘贴到 Qt 和第三方图书馆在场。

Thankyou for responding to my question. I have finally solved it and here is the solution:-

Mine was a Qt based VC++ solution, the app depended on some 3rd party dlls & libs.
My task was to provide 64bit support to my application for which I had build Qt and 3rd party dlls&libs in 64 bit OS.

I got the CRT error when I tried runnig my app in debug 64 bit config. The error persisted even after I had copied the following CRTs to bin folder of my application

redist\Debug_NonRedist\amd64\Microsoft.VC90.DebugCRT:

  1. Microsoft.VC90.DebugCRT.manifest
  2. msvcm90d.dll
  3. msvcp90d.dll
  4. msvcr90d.dll

Microsoft.VC90.DebugOpenMP:

  1. vcomp90d.dll

I was able to launch my app successfully in debug 64 bit mode when I pasted the above CRTs in the corresponding bin folders where Qt and 3rd party libraries were present.

可爱暴击 2025-01-04 09:52:23

在将“权限提升”清单添加到我的 Delphi 控制台应用程序(32 位,在 Win7 x64 上运行时出现问题)后,我遇到了同样的问题。
该问题与清单文件中提到的依赖项有关:

<dependency>
<dependentAssembly>
  <assemblyIdentity
    type="win32"
    name="Microsoft.Windows.Common-Controls"
    version="6.0.0.0"
    publicKeyToken="6595b64144ccf1df"
    language="*"
    processorArchitecture="*"/>
</dependentAssembly>
</dependency>

当我从清单中删除它时,并排错误消失了。

I had the same issue after adding a manifest for "Privilege elevation" to my Delphi console application (32bits, issue when it ran on Win7 x64).
The issue was related to a dependency mentioned in the manifest file:

<dependency>
<dependentAssembly>
  <assemblyIdentity
    type="win32"
    name="Microsoft.Windows.Common-Controls"
    version="6.0.0.0"
    publicKeyToken="6595b64144ccf1df"
    language="*"
    processorArchitecture="*"/>
</dependentAssembly>
</dependency>

When I removed it from the manifest, the Side by Side error disappeared.

ぺ禁宫浮华殁 2025-01-04 09:52:23

Depends 不适用于并排依赖项,因为它通常会使 DLL 看起来像是已找到,而实际上需要的版本略有不同。

您可以使用 sxstrace.exe 更好地了解缺少的内容:

http://blogs.msdn.com/b/junfeng/archive/2006/04/14/576314.aspx

事件日志通常显示并排错误,但遗憾的是,除了表明您有问题之外,这些错误并没有为您提供太多信息。

Depends is not great with side-by-side dependencies because it can often make it look like the dll is found when actually a slightly different version was required.

You can use sxstrace.exe to get a better idea of what's missing:

http://blogs.msdn.com/b/junfeng/archive/2006/04/14/576314.aspx

The event log usually shows side-by-side errors but sadly these don't give you much information other than that you have a problem.

寻找一个思念的角度 2025-01-04 09:52:23

安装 VS2008 SP1 来修复此问题。

  • 安装前,请确保在正确安装 Visual Studio 时选择“64 位编译器和工具”功能。 (如果您在安装 SP1 后安装它,则可能需要卸载并重新安装 SP 才能获得修复。)

  • 要检查是否安装了 SxS 条目,请查看是否有名称类似于 的目录amd64_microsoft.vc90.debugcrt* 位于 %WinDir%\WinSxS 中。


原因是VS2008安装程序中的一个错误。它仅将 32 位版本的 DebugCRT 安装到所有程序都可以找到的 \WinSxS 缓存中。它确实在 %ProgramFiles% 下安装了相同的 DLL,但程序在那里找不到它们。

而包含 x64 DebugCRT 的功能共享程序集 组件是“公布”的,而不是由于某种原因安装的。这可以在 VS2008 安装程序在安装用户的 %Temp% 中搜索“DebugCRT”时留下的安装日志中看到。相同的文件确实存在于 c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\redist\Debug_NonRedist 中(作为另一个组件的一部分),但不会复制到 WinSxS< /代码>。

(通过查看 Orcavs_setup.msi 内容>,最可能的直接原因似乎是隐藏特征条目缺少 msidbFeatureAttributesFollowParent 标志,这会导致它们永远不会被安装。)

无论是什么原因,VS2008 SP1 都会修复它。它的安装有一个副作用:它还会强制安装许多其他功能,这些功能在 VS2008 安装期间可能已选择或未选择(例如 MFC/ATL 运行时),但与损坏的安装相比,这带来的不便要少得多。

Install VS2008 SP1 to fix this.

  • Before installing, make sure that the "64-bit compilers and tools" feature was selected when installing the Visual Studio proper. (If you install it after installing SP1, you will probably need to uninstall and reinstall the SP to get the fix.)

  • To check if you have the SxS entry installed, see if there are directories with the names like amd64_microsoft.vc90.debugcrt* in %WinDir%\WinSxS.


The reason is a bug in VS2008 installer. It only installs the 32-bit version of the DebugCRT into the <Windows>\WinSxS cache where all programs can find it. It does install the same DLLs under %ProgramFiles% but programs can't find them there.

While the feature containing the x64 DebugCRT shared assembly component is "advertized" rather than installed for some reason. This can be seen in installation logs that VS2008 setup leaves in %Temp% of the installing user by searching them for "DebugCRT". The same files are indeed present in c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\redist\Debug_NonRedist (as part of another component) but are not duplicated to WinSxS.

(By looking at vs_setup.msi contents wth Orca, the most probable direct cause seems to be that hidden feature entries lack the msidbFeatureAttributesFollowParent flag, which causes them to never be installed.)

Whatever is the cause, VS2008 SP1 fixes it. Its installation has a side effect: it also forcibly installs many other features that may or may not have been selected during VS2008 install (e.g. MFC/ATL runtimes) but compared to a broken installation, that is a much lesser inconvenience.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文