项目引用不断恢复 [英] Project references keep reverting

查看:24
本文介绍了项目引用不断恢复的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有 3 个 .vbp 项目,它们属于一个组.

I have 3 .vbp projects that are part of a group.

我能够制作 3 和 2 的 dll,以及当我想要制作 1 的 dll 时.

I am able to make dll of 3 and 2 and when I wanted to make the dll of 1.

我正在将项目 1 的项目引用设置为项目 2 的正确 dll.

I am setting the project reference of 1 to the correct dll of project 2.

但是,当我保存更改并重新打开 vbg 文件时.未显示我更改的引用,它会恢复到其他版本的 dll.

However, when I save the changes and re open the vbg file. The reference that I have changed is not shown and it reverts back to someother version of the dll.

我没有在 COM 中工作过,无法继续前进.非常感谢任何输入或支持.

I havent worked in COM and I am unable to move forward. Any input or support is highly appreciated.

推荐答案

当您引用 ActiveX 或 COM DLL 和 EXE 时,您几乎无法控制实际使用哪个 DLL 或 EXE 文件,因为 VB6 严格按照 GUID 工作和 Windows 注册表.使用 VB6 和 ActiveX 并保持理智的关键是了解二进制兼容性.(参见 http://www.vbsight.com/BinaryComp.htm).

When you reference ActiveX or COM DLL's and EXE's, you have little to no control over which DLL or EXE file actually gets used because VB6 is working strictly from the GUIDs and the Windows Registry. The key to working with VB6 and ActiveX and also keeping your sanity is to understand Binary Compatibility. (See http://www.vbsight.com/BinaryComp.htm ).

以下是我对 ActiveX/COM 项目(无论是 EXE、DLL 还是 OCX)的建议:

Here's my advice regarding ActiveX/COM projects (whether EXE, DLL, or OCX):

(1) 了解二进制兼容性设置.

(1) Learn about the Binary Compatibility settings.

(2) 使用 .cmp 后缀您的参考可执行文件是一种很好的做法,例如 Project1.dll.cmp.当您查看二进制兼容性时,您就会明白我的意思.

(2) It is good practice to suffix your reference executable with a .cmp, such as Project1.dll.cmp. When you look up Binary Compatibility, you'll know what I mean.

(3) 在VirtualPC 内开发你的VB6 ActiveX 项目;VB6 ActiveX 开发给 Windows 注册表带来了很多磨损.

(3) Develop your VB6 ActiveX projects inside of VirtualPC; VB6 ActiveX development puts a lot of wear and tear on the Windows Registry.

(4) 当VB有理由定位一个ActiveX对象时,Reference=设置中DLL/EXE/OCX的文件路径会改变;它将使用它在注册表中找到的任何内容(最新注册的获胜).此外,还有升级 ActiveX 控件"设置可以进行更改的项目属性.

(4) The file path to the DLL/EXE/OCX in the Reference= setting will change when VB has reason to locate an ActiveX object; it will go with whatever it finds in the registry (the latest to register wins). Also, there is the "Upgrade ActiveX Controls" setting the Project properties that can make changes.

(5) 除了通过适当的二进制兼容性管理可以实现的程度之外,您几乎无法控制 VB6 将生成的 GUID 或类型库.

(5) You have little to no control over the GUID or Type Library that VB6 will generate, except to the degree you can achieve via proper Binary Compatibility management.

这篇关于项目引用不断恢复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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