none
The designer could not be shown for this file because none of the classes within it can be designed. RRS feed

  • Question

  • Hello VS experts.  :) :)

    First let me say that I am just learning how to use Visual Studio.  

    I am getting the error listed in the title of this post.  Let tell you exactly what I did to get the error. 

    I created a Windows Forms app.  The first time I did this I had 4 labels on the form.  I needed to interrupt what I was doing so, I thought to save my project.  When the was done I received the above error.  I am using the express version of VS2017.  I have done this many times with VS2015 with no problems.  I thought well, maybe it was because I had 4 labels on the form, so I did it again, and put nothing on the form.  I wrote a small bit of code to run during load and it worked just fine.  I can load it, I can debug it,, I just cannot save it.  I googled the main error and found another very similar that said  form1 could not be designed because it was not the first class in the file.  What in the heck does that mean.  What file are they talking about.  I simply created a VB app.  I am going to try to remove VS2015 again.. I did have a little problem uninstalling it.  Then I'm going to try again.  If I still get the error I am going to load VS2017 in my VM and see it runs there.  If anybody can help me with this error.. I would greatly appreciate it.  

    Saturday, September 22, 2018 1:39 AM

Answers

  • Best option is to create a new form and start over. The only other recourse (and you need to know the structure of a form) is to "Show all files" under the project menu and scan for issues which may or may not be apparent to the naked eye) and when found fix them or report back here.

    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    • Marked as answer by Kasmar45 Saturday, September 22, 2018 4:58 AM
    Saturday, September 22, 2018 2:32 AM
    Moderator

All replies

  • Best option is to create a new form and start over. The only other recourse (and you need to know the structure of a form) is to "Show all files" under the project menu and scan for issues which may or may not be apparent to the naked eye) and when found fix them or report back here.

    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    • Marked as answer by Kasmar45 Saturday, September 22, 2018 4:58 AM
    Saturday, September 22, 2018 2:32 AM
    Moderator
  • Hi everyone,   Thanks to everyone who read my quest for help.   I was able to solve this myself, by doing a repair install of vs2017.  All is well now so I can continue my trip down to the road to happy programming.  
    Saturday, September 22, 2018 5:01 AM