VS2010 is removing code from designer without warning - causing issues

Posted by schmoopy on Stack Overflow See other posts from Stack Overflow or by schmoopy
Published on 2010-06-02T13:32:44Z Indexed on 2010/06/02 13:33 UTC
Read the original article Hit count: 227

I have a WinForm with a pretty complex layout (has lots of controls, panels, etc.) Whenever i open the form the file is automatically checked out from source control and it removes anything in the designer file that refereces my menustrip or statusstrip

ie: the following get removed (w/o warning)

Me.MyMenuStip.SuspendLayout()
Me.MyStatusStrip.SuspendLayout()

Me.MyMenuStrip.ResumeLayout(False)
Me.MyMenuStrip.PerformLayout()

Me.MyStatusStrip.ResumeLayout(False)
Me.MyStatusStrip.PerformLayout()

The code still builds, but there are no Menu or Status items rendered. Any ideas on what i can do? I do not want to just remove/add the menustrip for instance cause i would loose all of my menu items (and there are a lot) Thanks in advance!

© Stack Overflow or respective owner

Related posts about vb.net

Related posts about winforms