问题描述
直到最近,我们还在愉快地使用 免注册 COM我们的本机和 .NET COM 组件.然而,我们遇到了一个奇怪的问题,我们的应用程序在 Windows XP SP3 上开始随机崩溃(但不是在 vista 上),因为我们只更改了 .NET 程序集的版本号以从候选发布版移动到发布版.(你不就是讨厌墨菲定律吗?)
Until recently, we were happily using registration-free COM for our native and .NET COM components. However, we ran into a weird issue where our application started crashing randomly on windows XP SP3 (but not on vista) after we only changed the version number of a .NET assembly to move from release candidate to release. (Don't you just hate Murphy's law?)
经过许多人日和磨牙,我们发现问题是 sxs 中的一个已知错误.dll 在检索有关 .NET 类的信息时会导致堆损坏.有一个热修复程序可以使问题消失,但热修复程序不打算重新分发.
After many a lost man-day and teeth grinding, we discovered that the issue was a known bug in sxs.dll which causes heap corruption when retrieving information about a .NET class. There is a hot-fix which makes the issue disappear but hot-fixes are not intended to be redistributed.
我们有点难过,免注册 COM 实现中存在如此可怕的错误.有没有人成功地为 .NET 组件使用免注册 COM?您是如何解决这个问题的?
We're kinda stumped that there is such a horrible bug in the registration-free COM implementation. Is anyone out there successfully using registration-free COM for .NET components? How did you work around this issue?
推荐答案
这个问题与SxS如何计算类信息的大小有关.程序集的版本号是此信息的一部分.
This issue is related to how SxS calculates the size of the class information. The version number of the assembly is part of this information.
由于它使用的是候选发布版本号,也许您的解决方法是使发布的版本号与 RC 版本的长度相同.
Since it was working with the release candidate version number, perhaps the workaround for you is to make the version number of the release the same length as the RC release.
如果这对您不起作用,则有一个既定流程可以请求修补程序的再分发权限.我会聘请 Microsoft 客户支持来寻求这条路线.
If this doesn't work for you, there is an established process for requesting redistribution rights for hotfixes. I would engage Microsoft customer support to pursue this route.
这篇关于有没有人成功地将免注册 COM 与 .NET 组件一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!