달력

02

« 2012/02 »

  •  
  •  
  •  
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  •  
  •  
  •  

SYMPTOMS

You upgrade a Microsoft Visual C# project from Microsoft Visual Studio 2003 to Microsoft Visual Studio 2005. When you try to add a new form to the project, you may receive an error message that resembles the following:

The designer cannot process the code at line 32: this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; The code within the method 'InitializeComponent' is generated by the designer and should not be manually modified. Please remove any changes and try opening the designer again.
Additionally, when you try to open the existing forms in the project, you receive the same error message.

Note This problem occurs in design mode. When you compile the project, you receive no error messages.
Method 1

Check the default namespace of the project. Make sure that the default namespace does not contain the ".System" string.

Method 2
Change the code as follows:
Original string
System.Windows.Forms
Replacement string
global::System.Windows.Forms
Posted by -세티-