'<name>' is ambiguous in the namespace '<namespacename>'

  • Thread starter Thread starter Dobedani
  • Start date Start date
D

Dobedani

Hi folks,
I created some UserControls in VB.Net as pasrt of my Windows
application project and I added them to the Toolbox like this: (1)
rightclicking on the Toolbox panel, (2) selecting 'Choose Items' from
the appearing menu, (2) browsing to the executable which should become
the result of my project (4) selecting it and (5) by checking the
relevant controls in the list. I actually added the UserControls to my
MainForm in the designer, by clicking the relevant buttons which were
indeed added to the toolbox. Since then I get about 10 - 45 errors of
the above kind on a very regular basis. Quite maddening really.

I have already moved the code which loads the UserControls from the
Mainform.Designer.vb file to the subroutine which handles the Load
event in the Mainform.vb file. Now, at least I am able to see the
Mainform in the designer again without problems, but I'm still getting
the mentioned errors when I try to compile. Of course, the
UserControls are fully qualified wherever I reference them in the
code. I have tried removing the UserControls from the Toolbox but to
no avail. What am I doing wrong? Any help will be appreciated!

Kind regards,
Dobedani
The Netherlands
 
Dobedani said:
Hi folks,
I created some UserControls in VB.Net as pasrt of my Windows
application project and I added them to the Toolbox like this: (1)
rightclicking on the Toolbox panel, (2) selecting 'Choose Items' from
the appearing menu, (2) browsing to the executable which should become
the result of my project (4) selecting it and (5) by checking the
relevant controls in the list. I actually added the UserControls to my
MainForm in the designer, by clicking the relevant buttons which were
indeed added to the toolbox. Since then I get about 10 - 45 errors of
the above kind on a very regular basis. Quite maddening really.

I have already moved the code which loads the UserControls from the
Mainform.Designer.vb file to the subroutine which handles the Load
event in the Mainform.vb file. Now, at least I am able to see the
Mainform in the designer again without problems, but I'm still getting
the mentioned errors when I try to compile. Of course, the
UserControls are fully qualified wherever I reference them in the
code. I have tried removing the UserControls from the Toolbox but to
no avail. What am I doing wrong? Any help will be appreciated!

Kind regards,
Dobedani
The Netherlands

User controls from the current project have always shown up automatically in
a group within the toolbox. It sounds like you are adding the results of
your build to a permanent group box within the IDE. As you rebuild your
project, the toolbox contents would need to be updated. I'm not sure that
happens for the "permanent" controls rather than the "project" controls.

As far as the namespace issue, that may be simply that you are adding the
control from a "permanent" reference rather than a local reference, and
things are confused.

Mike
 
Back
Top