However, despite importing the ContainerControlDesigner's namespace (System.Web.UI.Design), the class definition could not be found and as a result it wouldn't compile. I discovered that the classes in the System.Web.UI.Design namespace belong to the System.Design.dll assembly which is not referenced by default in a Visual Studio 2005 web project. I had mistakenly assumed this class was already a part of the referenced System.Web.dll. After adding a reference to System.Design.dll (see image below) my custom control designer compiled flawlessly.

1 comment:
I just encountered this same issue on the Windows Forms side. Surely a class in the System.Windows.Forms.Design namespace should be in the System.Windows.Forms assembly?
Clearly not according to Microsoft!!
Post a Comment