Reflections on Tech. Life
Monday, February 21, 2005
 
Interesting info about disabling Googles AutoLink feature if you should need it: Google's new toolbar
 
(0) comments
Sunday, February 20, 2005
 
So your working with Visual Studio.net 2003 and you are happily adding Windows Forms and third party custom controls libraries to your project and building and rebuilding and testing.
You feel exhilarated like you've never been so productive and able to produce beautiful looking software so effortlessly; and then you get to a point where you start getting the following error message:

"is either undeclared or was never assigned"

You probably gleefully add some of your own user controls to the same project.

Well the solution is here.
Sort of:
FIX: Controls disappear from the Windows Forms Designer in Visual Studio .NET 2003

The cause is revealing:

CAUSE
This problem occurs if the user control project or the derived Windows Forms control project is in the same solution as the Windows Forms project, and you build the solution by using both a Debug configuration and a Release configuration. Under these conditions, when you open the Windows Forms Designer, the Windows Forms Designer may not correctly resolve the type for the control and may remove it from the Windows Form designer UI.

COMMENT
I wonder why they don't make the hotfix public domain. They want you to contact them for the solution almost as if they are tracking people who run into this problem as a certain group to be studied.

SOLUTION
Just remember to define your custom user controls in a separate Custom Controls Library and make your main project dependent on it.
It turns out that rebuilding does not guarantee that references to dependant classes are rebuilt in the right order and so references to your custom controls will sometimes go missing and generate the heartbreaking error above.

Implement this solution and you can return to your happy coding mind state.
All the best.
R
 
(0) comments
Observations about Technology by an Information Technology 20 yr Vet.

ARCHIVES
08/01/2003 - 09/01/2003 / 09/01/2003 - 10/01/2003 / 10/01/2003 - 11/01/2003 / 11/01/2003 - 12/01/2003 / 12/01/2003 - 01/01/2004 / 01/01/2004 - 02/01/2004 / 02/01/2004 - 03/01/2004 / 05/01/2004 - 06/01/2004 / 09/01/2004 - 10/01/2004 / 10/01/2004 - 11/01/2004 / 11/01/2004 - 12/01/2004 / 12/01/2004 - 01/01/2005 / 02/01/2005 - 03/01/2005 / 06/01/2005 - 07/01/2005 / 07/01/2005 - 08/01/2005 / 08/01/2005 - 09/01/2005 / 09/01/2005 - 10/01/2005 / 10/01/2005 - 11/01/2005 / 11/01/2005 - 12/01/2005 / 12/01/2005 - 01/01/2006 / 03/01/2006 - 04/01/2006 / 04/01/2006 - 05/01/2006 / 06/01/2006 - 07/01/2006 / 08/01/2006 - 09/01/2006 / 01/01/2007 - 02/01/2007 /


Powered by Blogger