Search code examples
vb.netformsvisual-studiovisual-studio-2017designer

Form designer missing controls after installing VS 2017 update


Today, VS 2017 Community Edition recommended I take a small update, which I did.

Now any VB.NET solution that I open shows a blank form (as if adding a new form). However, in examining the files, all of the controls and the associated code are present in the files. It just appears that the VB.NET Form Designer is not happy with something in a file.

Is there anything I can do to kick the Form Designer to display the form correctly or is there anything I can examine to ascertain some specific error it might be throwing so that I can look in the right place for resolution.


Solution

  • I figured it out and thought the solution might be useful for others.

    For some reason, the new version was converting every VB Form control from this (for example) Me.labelFrequency.Location = New System.Drawing.Point(113, 197)

    to this
    Me.labelFrequency.Location = New System.Drawing.Point(-32768, 197)

    (Note the italicized invalid coordinate).

    It did this for EVERY control in the project. The negative coordinate was throwing off the Designer (obviously).

    I cleared the VSTS cache and restored a version of the xyzzy.Designer.VB file with the correct values and it stopped doing this.

    Left this here in case anyone else found this useful.