Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't add usercontrol to form
Message
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01497539
Message ID:
01497543
Views:
34
>Hi All, I have a usercontrol in a class library that consists of nothing more than text boxes and labels. I have been using it on tab pages without a problem for a long time. Today I tried to drop it on a form from the toolbox and received a VS error: Failed to create component xxxx System.Runtime.InteropServices.COMException (0x80004005) Adding this project as a reference would cause a circular dependency etc... I've googled but haven't found anything of any help - any ideas ???

I assume the UserControl is in a different assembly to the Form in which you want to use it?
If the assembly/project containing the UserControl contains a reference to the assembly/project containing the form then you can get this error since the IDE will attempt to add a reference in the opposite direction.....
If that's the case you will need to re-organise your assembly/class structure - maybe put the UserControl in a separate assembly (you can still use the same namespace)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform