I had a bug with #develop 2 while trying to use the designer.
My project consists of many forms accessing a firebird db. As the forms have common properties, I made an abstract class inherting from System.Windows.Forms.Form, in this abstract class I defined the common methods, and from this class, almost all the forms of the project inherit.
The first problem is that sharp develop refuses to open any of my forms that inherit from the abstract class in the designer, and issues this error message:
Error loading designer:
System.ComponentModel.Design.Serialization.CodeDomSerializerException: The designer must create an instance of type 'MAG.CMAGMdiChild' but it cannot because the type is declared as abstract.
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)
MAG.CMAGMdiChild is the abstract class I told about. Unless I change the parent to System.Windows.Forms.Form I can't open the form in the designer.
The second problem is that when I do the same thing with another form of the project (changing the Parent to Form) and trying to open it in the designer, #develop raises the following exception:
.NET Version : 2.0.50727.42
OS Version : Microsoft Windows NT 5.1.2600 Service Pack 2
Current culture : English (United States) (en-US)
Working Set Memory : 75492kb
SharpDevelop Version : 2.0.0.1135
Exception thrown:
System.ArgumentException: Stream is not a valid resource file.
at System.Resources.ResourceReader.ReadResources()
at System.Resources.ResourceReader..ctor(String fileName)
at ICSharpCode.FormsDesigner.Services.DesignerResourceService.ResourceStorage.GetReader() in c:\SharpDevelop\Corsavy\SharpDevelop\src\AddIns\DisplayBindings\FormsDesigner\Project\Src\Services\DesignerResourceService.cs:line 97
at ICSharpCode.FormsDesigner.Services.DesignerResourceService.GetResourceReader(CultureInfo info) in c:\SharpDevelop\Corsavy\SharpDevelop\src\AddIns\DisplayBindings\FormsDesigner\Project\Src\Services\DesignerResourceService.cs:line 208