Monday, April 03, 2006
Note that my blog has moved to http://www.pksoftware.net/devblog/.

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: DerivedControl --- The base class 'GenericControlBase' could not be loaded. Ensure the assembly has been referenced and that all projects have been built.

I can understand "why" but its still a bit annoying! I have some windows forms user controls that inherit from a class that implements generics. Problem is the designer can't reflect those classes and in turn spits out the wonderful error above.

The work around I am using only covers base classes that do not inherit visually (though I have not tried otherwise). Basically when I want to edit the control visually I do this:

public partial class DerivedControl
//: UserControl
: GenericControlBase<XyzEntity>
{...}

And when I am done, I flick it back:

public partial class DerivedControl
: UserControl
//: GenericControlBase<XyzEntity>
{...}

Tis a hack, but it works! :-)

 


BTW, I applied the patch mentioned earlier - http://support.microsoft.com/default.aspx?scid=kb;en-us;912019 - and my designer issues went away (except for the generics stuff but that’s cool). I did experience problems with vanilla controls, but not vanilla forms... I did find that the only real fix when it does happen was to close VS.Net and re-open. I also noticed that if forms were open when the project was loaded the issue was more likely to come up.
Monday, April 03, 2006 10:10:43 PM (GMT Standard Time, UTC+00:00) |  |  | #
Note that my blog has moved to http://www.pksoftware.net/devblog/.
Search
Links
My blog has moved to http://www.pksoftware.net/devblog/
Products
Mini SQL Query
Mini SQL Query is a minimalist SQL query tool for multiple providers (MSSQL, Oracle, OLEDB, MS Access files etc.)

Verse Popper
The "Verse Popper" displays bible verses periodically in the lower right hand corner of your screen.

Blogroll
My blog has moved to http://www.pksoftware.net/devblog/