title: Visual studio disappearing menu
body: <p>As I develop an application in Visual Studio 2010, every so often, the application's main menu strip disappears.</p>
  
  <p>In the past I panicked, and then rebuilt the menu from scratch in the design view.</p>
  
  <p>These days, I no longer panic. Instead, I find the Main Menu declaration in the [applicationName].Designer.cs file, which normally looks like this:</p>
  
  <pre><code>    // mainMenus
      // 
      this.mainMenus.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
          this.fileMenuItem,
          this.viewMenuItem,
          this.helpMenuItem});
      this.mainMenus.Location = new System.Drawing.Point(0, 0);
      this.mainMenus.Name = "mainMenus";
      this.mainMenus.Size = new System.Drawing.Size(1008, 24);
      this.mainMenus.TabIndex = 17;
      this.mainMenus.Text = "menuStrip1";
  </code></pre>
  
  <p>instead looks like this:</p>
  
  <pre><code>    // mainMenus
      // 
      this.mainMenus.Location = new System.Drawing.Point(0, 0);
      this.mainMenus.Name = "mainMenus";
      this.mainMenus.Size = new System.Drawing.Size(1008, 24);
      this.mainMenus.TabIndex = 17;
      this.mainMenus.Text = "menuStrip1";
  </code></pre>
  
  <p>So I manually edit that file to restore the missing </p>
  
  <pre><code>    this.mainMenus.Items.AddRange line.
  </code></pre>
  
  <p>(Yes, I know you're not supposed to edit the [applicationName].Designer.cs file, because it's generated by Visual Studio. Still, that does fix it.)</p>
  
  <p>My question is: any idea why the main menu strip keeps on disappearing? and how to prevent it from happening in the future?</p>