Visual Studio 2005 - C++ - 控制清单创建的因素

发布于 2024-07-15 20:20:24 字数 1119 浏览 4 评论 0原文

我试图弄清楚为什么调试版本会因“找不到依赖程序集 microsoft.vc80.debugcrt”事件错误而崩溃。

删除所有内容(除 .cpp 或 .h 之外的任何内容)并重新创建解决方案后 - 我仍然遇到问题。

谷歌搜索没有结果,重新安装VS也没有产生任何变化。

我确实在 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c 中有 dll。

我打开了 \debug\.exe.intermediate.manifest 文件,它有 2 个(dependentAssembly)条目:
第一个:名称='Microsoft.VC80.DebugCRT'版本='8.0.50608.0'
第二: name='Microsoft.VC80.DebugCRT' version='8.0.50727.762'

如果我删除一个并将另一个更改为 name='Microsoft.VC80.DebugCRT' version='8.0.50727.42'

我可以获得将启动的构建。

当然我确实安装了 VS2008 - 但是是什么控制了版本? 或如何才能“坚持”正确的调试 dll 版本。

通过控制面板卸载VS2008。

编辑:如果搜索 DebugCRT,则在注册表中找不到任何内容。
环境路径指向VS8文件夹。
c:\windows\winsxs\policies文件夹下只有1个DebugCRT文件夹
(8.0.50.727.42)
c:\windows\winsxs\manifests 文件夹仅包含 .42 版本的 .cat 和 .manifest
.manifest 文件(在上面的清单文件夹中)的版本为“8.0.50727.42”

说明:清单文件有 2 个“dependentAssembly”条目,每个条目都有不同的版本,而不是 .42。 我可以删除 1 个条目并更改另一个条目的版本以匹配 .42,从而启动调试版本。

EDIT2:我也在使用 boost 并且在 DLL 内部有 .762 版本

I was trying to figure out why a debug build was blowing up with the "dependent assembly microsoft.vc80.debugcrt could not be found" event error.

After deleting everything (anything not .cpp or .h) and recreating the solution - I still had the problem.

A google search was fruitless and a re-install of VS didn't produce any change.

I did have the dlls in C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c.

I opened the \debug\.exe.intermediate.manifest file and it had 2 (dependentAssembly) entries:
1st: name='Microsoft.VC80.DebugCRT' version='8.0.50608.0'
2nd: name='Microsoft.VC80.DebugCRT' version='8.0.50727.762'

If I delete one and change the other one to
name='Microsoft.VC80.DebugCRT' version='8.0.50727.42'

I can get a build that will start.

Granted I did have VS2008 installed - but what is controlling the versions ? or How can I get the right debug dll version to "stick".

VS2008 was de-installed through the control panel.

EDIT: Found nothing in the registry if DebugCRT is searched for.
the environment path points to the VS8 folders .
There is only 1 DebugCRT folder in the c:\windows\winsxs\policies folder
(8.0.50.727.42)
The c:\windows\winsxs\manifests folder only has the .42 version of .cat and .manifest
The .manifest file (in above manifest folder) has version="8.0.50727.42"

Clarification: the manifest file has 2 "dependentAssembly" entries each with different versions and not the .42. I can delete 1 entry and change the version on the other to match the .42 to get a debug build that starts.

EDIT2:I'm also using boost and inside the DLLs there is the .762 version

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

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

发布评论

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

评论(3

棒棒糖 2024-07-22 20:20:24

该版本是从 Boost DLL 中获取的,Boost DLL 是 Boost 的下载预编译版本。 重新编译(并重新安装)库后,解决方案的重新构建会生成一个具有单个版本的清单,并且程序会链接并运行。

因此 - 检查导入到解决方案中的库和 dll 以了解所使用的版本。

The version was picked up by from the Boost DLLs which were a download, pre-compiled version of Boost. Once the libraries were re-compiled (and re-installed) a re-build of the solution produced a manifest with a single version and the program linked and ran.

So -Check the libs and dlls that are imported into the solution for version used.

半葬歌 2024-07-22 20:20:24

VS 2008 是 VC90 而不是 VC80,所以这不是问题的一部分。 清单请求的程序集和 SxS 加载的程序集之间的关系可以在 C:\WINDOWS\WinSxS\Policies 中找到。 IIRC,“8.0.50608.0”是由 VS2005 pre-SP1 生成的。 这是错误的,应该是 8.0.50727.42,但这被策略捕获了。

我不确定你是如何获得两个清单的。 您的清单设置是什么?

VS 2008 is VC90 not VC80, so that's not part of the problem. The relation between manifest-requested assembly and SxS-loaded assenbly is found in C:\WINDOWS\WinSxS\Policies. IIRC, "8.0.50608.0" is generated by VS2005 pre-SP1. It's wrong, and should have been 8.0.50727.42, but this is caught by the policy.

I'm not sure how you're getting two manifests. What are your manifest settings?

毁梦 2024-07-22 20:20:24

我建议在您的特定环境中重建 Boost。 另外,您可以通过静态链接 CRT 来完全消除并排程序集......

I'd suggest rebuilding Boost in your particular environment. Also, you could do away with the Side by Side assemblies altogether by linking the CRT statically...

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