Really easy to reproduce this one.
Ranorex Version 5.0.3.18203
.Net Runtime Version 4.0.30319.18444
Windows 7 Professional
- Right click on project and select add new item
Select C# folder
Select Windows Applications
Select Form from templates
Click Create
Close the new form1.cs (as the tabs are missing for source, history and design)
Double click on form1.cs to reopen
Click on Design
Drag a label onto the form (Select View and then Tools if you do not have them up)
Drag a textbox on the form
Click Build.
You get the following error:
ICSharpCode.FormsDesigner.FormsDesignerLoadException: ICSharpCode.FormsDesigner.FormsDesignerLoadException: Syntax errors in
In the code it is placing the declarations for the textbox1 and label1 in the middle of the initialize component instead of at the beginning of the class. You can see in the code below.
Code: Select all
[language=csharp]
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label1;
this.label1.Location = new System.Drawing.Point(120, 43);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(35, 13);
this.label1.TabIndex = 0;
this.label1.Text = "label1";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(101, 70);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(100, 20);
this.textBox1.TabIndex = 1;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 262);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label1);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
this.PerformLayout();
}
[/language]