BUG: Circular Dependency Error After Breaking Compatibility
ID: Q190790
|
The information in this article applies to:
-
Microsoft Visual Basic Learning, Professional, and Enterprise Editions for Windows, version 6.0
SYMPTOMS
After breaking and restoring binary compatibility of an ActiveX control
that is hosted by another ActiveX control in the same Visual Basic project,
the following error occurs:
Circular dependencies between modules
This error occurs whenever you open the hosting control. In addition, the
hosted control is replaced by a picture box. Any attempt to add the hosted
control back to the hosting control generates the above error again.
RESOLUTION
Take the following steps to resolve this issue:
- Remove the hosted control (.ctl) from the project.
- Save and close the project.
- Reopen the project and add the hosted control (.ctl) back to the project
by selecting Add Control from the Project menu.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products
listed at the beginning of this article. We are researching this
bug and will post new information here in the Microsoft Knowledge
Base as it becomes available.
MORE INFORMATIONSteps to Reproduce Behavior
- Create a new ActiveX Control project in Visual Basic. UserControl1 is
created by default.
- From the Project menu, click Add User Control.
- In the Add User Control dialog box, double-click User Control. This will
create UserControl2.
- In the Project Explorer window, right-click on UserControl2 and click
View Code.
- Enter the following code in UserControl2:
Event Test()
- Close both the designer and code windows for UserControl2.
- From the Toolbox window, place Usercontrol2 on UserControl1.
- On the File menu, click Make Project1.ocx to compile the project.
- On the Project menu, click Project1 Properties, and then click the
Components tab.
- Under Version Compatibility, select Binary Compatibility and click OK.
- Close both UserControl designer windows, if open.
- In the Project Explorer, right-click on UserControl2 and click View
Code.
- Comment out the following line of code, entered in step 5:
Event Test()
- Open UserControl1's designer. The following incompatibility error
occurs:
The "Test" event exists in the version-compatible component, but not
in the current project.
Click Cancel to continue past this error.
- A second error will occur:
Error loading "c:\windows\temp\vbc2e4.tmp", a control could not be
loaded due to load error. Continue?
Click No to continue past this error.
NOTE: The path shown in the above error may vary due to varying
temporary file names.
- Remove the comment on the Event Test line in UserControl2; this should
restore compatibility.
- Open UserControl1's designer.
RESULT: The error "Circular dependencies between modules" is received
followed by the same message in step 15. If you select Yes to continue
loading, then Usercontrol1 opens with a picture box instead of
Usercontrol2. If you delete the Picture Box and attempt to add back
UserControl2 to UserControl1, the above error will be shown again.
Additional query words:
kbDSupport kbDSS kbCtrl kbVBp600bug kbCtrlCreate kbVBp
Keywords : kbGrpVB
Version :
Platform : WINDOWS
Issue type : kbbug
|