Unable to get the designer view window back using windows forms with Visual Studio 2010

后端 未结 15 1635
逝去的感伤
逝去的感伤 2020-12-20 11:08

I am in process of writing a C# Windows Forms application using Visual Studio Express 2010 ENU SP1. Further VS specifics are at the bottom of this post. I recently made so

15条回答
  •  無奈伤痛
    2020-12-20 11:40

    Tried all the suggestions mentioned in this question, nothing worked for Visual Studio Community 2017

    • no Shift-F7 shotcut
    • no context menu item visible
    • no double clicking on MainForm.cs
    • no wrong class order inside MainForm.cs
    • no wrong entries in mysolutionname.csproj file

    But this worked for me

    1. Right click your MainForm.cs file (or 'Form.cs' depending how you named it)
    2. 'Exlude from project'. This temporarily removes MainForm.cs, MainForm.Designer.cs and MainForm.resx
    3. Use 'Add » Existing item' and select MainForm.cs. This will re-include all three files.
      Of course you should add them back to the same folder as they were before
    4. Double click on MainForm.cs and Design view magically openes

提交回复
热议问题