|
Hi,
After hours spent on this little thing which drove me crazy, cause I got other things to do other than chasing bugs in the designer, I found the following:
If you create a ClassLibrary in which you create a user control UC1.vb for example. Now create a windows forms application and add 2 user controls FormsUC.vb which inherits from UC1 and another one FormsDerivedUC.vb which inherits from FormsUC. Compile and open FormsDerivedUC in the designer. Everything looks fine.
Now close all designers and go to the class library and rename UC1 to something else UC2 for Example. Recompile and reopen formsderivedUC again. Bang!! Here I get Could not load type 'ClassLibrary1.UC2' from assembly 'ClassLibrary1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. FormsUC still woks though no complaint.
Now create a Windows Forms Control Library instead of Class Library and repeat the steps. Everythig works smoothly.
I did a diff between the class library and control library and the only difference is that for each configuration (Debug or Release) in the control library there is this line defined: <DefineConstants>_MYFORMS=True</DefineConstants>
How does this affect things? I can get my problem fixed by closing and reopening the solution but that's not what I want to do for the money I spent on the tool right? I'm using VS 2008 Professional.
Did anybody encounter this before?
Thanks, Cosmin
|