SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Design Tab in CS crashes

Last post 03-16-2007 3:35 PM by bouli. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 01-18-2007 11:05 AM

    Design Tab in CS crashes

    Okay first things first... Hallo...

    Okay now to the problem, Using Embedded resources within the forms.resx file It gives me the following error:

     

    Error loading designer:

    System.ComponentModel.Design.Serialization.CodeDomSerializerException: Could not find type 'ResourceManager'.  Please make sure that the assembly that contains this type is referenced.  If this type is a part of your development project, make sure that the project has been successfully built.

     

    It should be noted that my program compile and execute perfectly, but using the ResourceManager and then clicking on Design tab crashes the Design tab... when I uncomment the ResourceManager lines (without re-compiling) it works great... 

  • 01-19-2007 7:26 AM In reply to

    Re: Design Tab in CS crashes

    The code that causes this error is when I do the following within my Form InitializeComponent function:

                ResourceManager internalResources = new ResourceManager(typeof(MainForm));
                
                this.button1 = new System.Windows.Forms.Button();
                this.SuspendLayout();
                //
                // button1
                //
                this.button1.Location = new System.Drawing.Point(271, 219);
                this.button1.Name = "button1";
                this.button1.Size = new System.Drawing.Size(75, 23);
                this.button1.TabIndex = 0;
                this.button1.Text = internalResources.GetString("ButtonString_Close"); //This Crashes the Design Tab
                this.button1.UseVisualStyleBackColor = true;
                this.button1.Click += new System.EventHandler(this.Button1Click);

    Hope it makes more sense now! 

  • 01-19-2007 3:20 PM In reply to

    Re: Design Tab in CS crashes

    First of all, you should not modify the InitializeComponent method manually. Your changes will be overwritten as soon as you make the next change using the designer.

    The standard way for making a form localizable is to set the form's Localizable property to true. Then the designer automatically generates code that accesses the resources, similar to what you have written.

    If you still want to change the code manually for whatever reason, you need to use "System.Resources.ResourceManager" instead of "ResourceManager" because the designer loader only understands fully qualified type names.


    Christian

  • 03-16-2007 3:35 PM In reply to

    • bouli
    • Not Ranked
    • Joined on 03-16-2007
    • Posts 1

    Re: Design Tab in CS crashes

    Hello,

     I have exactly the same problem.

    It cames when I ran an old sharpdevelop 1.1 program under sharpdevelop 2.0

    It says to me same thing "could not find type..." but type exist.

    my program compile and execute perfectly too.I

    Is someone has the solution ?

Page 1 of 1 (4 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.