在构建过程中VB6 COM引导再生 [英] VB6 COM Guid Regeneration during Build

查看:111
本文介绍了在构建过程中VB6 COM引导再生的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VB6中构建了大量的dll和ocx,每次重新构建这些项目时,代表对象的所有Guid都会更改.我使用VB6.exe/make进行构建.

这会给我一些使用这些组件的.net代码带来很多问题,即,如果我构建vb6,则必须重新生成.net interop dll以反映新的GUID.

所以我的问题是:是否有一种方法可以修复GUID,所以无论vb6项目被重建多少次,它们都不会改变?

P.s.所有VB6项目都具有二进制兼容性.

I have a mass of dlls and ocxs built in VB6, each time I rebuild these projects all the guids representing the objects are changed. I build using VB6.exe /make.

This causes me a lot of problems with some .net code that uses these components, i.e. if I build the vb6 I have to regenerate the .net interop dlls to reflect the new GUIDs

So my question is: Is there a way to Fix the GUIDs so they never change no matter how many times the vb6 projects are rebuilt?

P.s. All the VB6 projects have binary compatibility on.

推荐答案

在项目属性的Component选项卡中设置Binary Compatibility. http://blogs.msdn.com/b/adam_nathan/archive/2003/10/19/56779.aspx [ ^ ]
Set Binary Compatibility in Component tab of project properties.
http://blogs.msdn.com/b/adam_nathan/archive/2003/10/19/56779.aspx[^]


您可以通过将项目的兼容性设置从无兼容性"更改为二进制兼容性"来告诉VB6重用GUID. ".您可以在项目"->您的项目"属性下找到这些设置.兼容性设置位于项目属性"窗口的组件"选项卡上.
You can tell VB6 to reuse GUID''s by changing the compatbility setting of the project to from "No Compatbility" to "Binary Compatibility". You can find these settings under Project->Your-Project Properties. The compatibility setting is on the Component tab of the Project Properties window.


这篇关于在构建过程中VB6 COM引导再生的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆