Is anyone successfully using registration-free COM with .NET components?

霸气de小男生 提交于 2019-11-27 05:36:48

问题


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?)

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.

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?


回答1:


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.

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.

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.




回答2:


We're using registration-free COM for both native and .NET components. We decided to use a fixed assembly version number for these components (mainly to prevent cluttering the registry when repeatedly regasm-ing .NET components that had a dynamic build number/*). Not ideal but we have other ways of determining which version of a given component is being used (they're never patched individually).

That sounds like a very nasty issue indeed! That KB article almost makes it seem like using SxS is optional... As far as I know it's the only way to do reg-free COM?




回答3:


FYI the hotfix is now directly downloadable: http://www.microsoft.com/en-us/download/details.aspx?id=27680



来源:https://stackoverflow.com/questions/617253/is-anyone-successfully-using-registration-free-com-with-net-components

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!