c# - VS 2012 Designer could not be shown -
i have usercontrol class employee_employeekeyonerelationuc
inherit relationuc
inherit relationbase
inherit system.window.forms.usercontrol
when try open employee_employeekeyonerelationuc
in designer have error :
the designer not shown file because none of classes within can designed. designer inspected following classes in file: employee_employeekeyonerelationuc --- base class 'astusfms.content.relationuc' not loaded. ensure assembly has been referenced , projects have been built.
but when open relationuc
, relationbase
both showing correctly.
my program still compiling why bothering me ? because have form employeeform
use lot of usercontrol
(like employee_employeekeyonerelationuc
) , when try edit in form, every usercontrol included in form inherit usercontrolebase
deleted (left: tfs server, right: local) :
this diff showing designer deleted ucemployee*
object. because change combobox's name (combobox has no relation 1 of uc).
i have notice when create new usercontrol file default code showing has error :
but using system.windows.forms;
right there. if change usercontrol
system.windows.forms.usercontrol
works.
i may not clear enough if have question, i'll on answer , test day.
tested on 3 different computer vs2010, vs2012 update 1, vs2012 update 2
when using generics inside form or usercontrol, it's recommended put empty class define generic type. current form derives class.
i put class inside same file. has after actual form code this:
public partial class employee_employeekeyonerelationuc : employee_employeekeyonerelation_genericuc { ... } public class employee_employeekeyonerelation_genericuc : relationuc<myobject> { }
Comments
Post a Comment