Visual Studio 2008 Winform designer fails to load Form which inherits from generic class -


i have winforms project, , created class on assembly a inherits system.windows.forms.form serve base class various forms on project, base class like:

public partial class dataform<t> : form t : class {      t currentrecord;      protected t currentrecord     {                 {             return currentrecord;         }         set         {             currentrecord = value;             currentrecordchanged();         }     } } 

now, when create form on assembly b inherits dataform designer won't load, if compile app runs fine.

the form looks like:

public partial class sometablewindow : dataform<sometable> {     public sometablewindow ()     {         initializecomponent();     } } 

the error i'm getting is:

the designer not shown file because none of classes within can designed.  designer inspected following classes in file: cultivoswindow --- base class 'tripleh.erp.controls.dataform' not loaded. ensure assembly has  been referenced , projects have been built.       instances of error (1)    1.   hide call stack   @ system.componentmodel.design.serialization.codedomdesignerloader.ensuredocument(idesignerserializationmanager manager) @ system.componentmodel.design.serialization.codedomdesignerloader.performload(idesignerserializationmanager manager) @ microsoft.visualstudio.design.serialization.codedom.vscodedomdesignerloader.performload(idesignerserializationmanager serializationmanager) @ system.componentmodel.design.serialization.basicdesignerloader.beginload(idesignerloaderhost host)   

is bug on designer?, doing wrong? there workaround this?

thank help

it's known limitation. can work around declaring class inherits generic class.

for instance:

class generic<t> : usercontrol { } 

then

class genericint : generic<int> { } 

then use genericint instead of generic. sucks know.


Comments

Popular posts from this blog

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

c++ - Convert big endian to little endian when reading from a binary file -

openssl - Load PKCS#8 binary key into Ruby -