By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,490 Members | 3,228 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,490 IT Pros & Developers. It's quick & easy.

Designer doesn't work after overriding base class

P: n/a
Hi,

I have a class (say O1) that overrides
System::Windows::Forms::UserControl and then another one that overrides
O1 (call it O2). O2 used to work with the Designer as it was inheriting
directly from UserControl (and was created using the wizard) but since
I inserted O1 into inheritance tree (without resx, straight override) I
get the error pasted at the bottom when trying to open O2 in Designer.
I deleted the NCB file to no avail. Everything builds and runs just
fine. Can anyone help? Thanks.

The designer could not be shown for this file because none of the
classes within it can be designed. The designer inspected the following
classes in the file: O2 --- The base class 'O1' could not be loaded.
Ensure the assembly has been referenced and that all projects have been
built.
Hide

at
System.ComponentModel.Design.Serialization.CodeDom DesignerLoader.EnsureDocument(IDesignerSerializati onManager
manager)
at
System.ComponentModel.Design.Serialization.CodeDom DesignerLoader.PerformLoad(IDesignerSerializationM anager
manager)
at
Microsoft.VisualStudio.Design.Serialization.CodeDo m.VSCodeDomDesignerLoader.PerformLoad(IDesignerSer ializationManager
serializationManager)
at
System.ComponentModel.Design.Serialization.BasicDe signerLoader.BeginLoad(IDesignerLoaderHost
host)

Jul 2 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
The designer is looking for it's IntializeComponent method and all the code
that it has added. If it can't find that, or it isn't in the structure it
expects (e.g. you've edited it) it will fail.

Basically, the Designer doesn't support use of a derivation of a derivation
of UserControl.

--
http://www.peterRitchie.com/
Microsoft MVP, Visual Development - C#
"du****@gmail.com" wrote:
Hi,

I have a class (say O1) that overrides
System::Windows::Forms::UserControl and then another one that overrides
O1 (call it O2). O2 used to work with the Designer as it was inheriting
directly from UserControl (and was created using the wizard) but since
I inserted O1 into inheritance tree (without resx, straight override) I
get the error pasted at the bottom when trying to open O2 in Designer.
I deleted the NCB file to no avail. Everything builds and runs just
fine. Can anyone help? Thanks.

The designer could not be shown for this file because none of the
classes within it can be designed. The designer inspected the following
classes in the file: O2 --- The base class 'O1' could not be loaded.
Ensure the assembly has been referenced and that all projects have been
built.
Hide

at
System.ComponentModel.Design.Serialization.CodeDom DesignerLoader.EnsureDocument(IDesignerSerializati onManager
manager)
at
System.ComponentModel.Design.Serialization.CodeDom DesignerLoader.PerformLoad(IDesignerSerializationM anager
manager)
at
Microsoft.VisualStudio.Design.Serialization.CodeDo m.VSCodeDomDesignerLoader.PerformLoad(IDesignerSer ializationManager
serializationManager)
at
System.ComponentModel.Design.Serialization.BasicDe signerLoader.BeginLoad(IDesignerLoaderHost
host)

Jul 3 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.