Failed to create component 'AxHost'. How to remove reference?
I guess the recompiled ocx itself is not the problem. I have compiled it in VB6 with project compability, but I also tried it with no version compability.
The following error message occurs if I try to place a user control of the ocx onto a form:
Failed to create component 'AxHost'. The error mesage follows:
'System.Runtime.InteropServices.ComException (0x80004005): A reference to this type libraryalready exists. You mustremove the reference '<MyOCX>' before adding this one.
at System.Windows.Forms.Design.DocumentDesigner.AxToolboxItem.CreateComponentsCore(IDesignerHost host)
at System.Drawing.Design.ToolboxItem.CreateComponentsCore(IDesignerHost host, IDictionary defaultValue)
.
.
.
I tried to remove the reference from the toolbox. It disappeared. Then I tried to create the new reference what also worked fine. But as soon as I want to put the user control onto the form the error message occurs.
Are there any other references that I have to remove? Do I do anything wronng? Is this a bug in VS2005 Beta2 or even a strange feature of VS2005?

