Resolved The view designer menu is not available

SilverShaded

Well-known member
Joined
Mar 7, 2020
Messages
93
Programming Experience
10+
The 'view designer' menu is not available and several forms (but not all) are not recognise as being forms in the VS Solution Explorer. It is a .Net Winforms project. They used to be recognised as forms up until some recent updates to the VS. How can i edit them visually?
 
Solution
Have you tried to rebuild the projects?
Does your projects have any custom dependencies or custom controls?
What is your installed version of VS?

You may have been burned by the Winforms Designer. I actually thought this would have been fixed by now as it's a known generations old problem and it's also the reason I hand design all of my forms by code without the help of the designer.
Sometimes rebuilding the solution can fix the issues.

And how exactly did you go about renaming them and why did you feel the need to do that?

The project build without problem, its the most current version of VS 2019.
I sometimes change namespaces, as the project grows in complexity sometimes they need to be made more meaningfull. It was...
Previously I had chnaged the namespace globally, then for whatever reason changed it back again, evything compiled ok but the forms were not recognises as such by VS. The solution was to manually change the namespace in the form (not globally, just at the top of the form class), then chanage it back again, after that the Form was now recognised as such.
 
Have you tried to rebuild the projects?
Does your projects have any custom dependencies or custom controls?
What is your installed version of VS?

You may have been burned by the Winforms Designer. I actually thought this would have been fixed by now as it's a known generations old problem and it's also the reason I hand design all of my forms by code without the help of the designer.
Sometimes rebuilding the solution can fix the issues.
Previously I had chnaged the namespace globally, then for whatever reason changed it back again
And how exactly did you go about renaming them and why did you feel the need to do that?
 
Have you tried to rebuild the projects?
Does your projects have any custom dependencies or custom controls?
What is your installed version of VS?

You may have been burned by the Winforms Designer. I actually thought this would have been fixed by now as it's a known generations old problem and it's also the reason I hand design all of my forms by code without the help of the designer.
Sometimes rebuilding the solution can fix the issues.

And how exactly did you go about renaming them and why did you feel the need to do that?

The project build without problem, its the most current version of VS 2019.
I sometimes change namespaces, as the project grows in complexity sometimes they need to be made more meaningfull. It was renamed by using F2 and then enter. Renaming them didnt break the code. It was i renamed it back again that i noticed the view designer was not available. The fix was manually altering the Namespace (in the individual file in one plac (at this point the code is broken), then naming it back again then VS recognised it as a form again).
 
Solution
I am also running the latest version of VS, and I just did what you said and i didn't experience any problems like you have reported. This is however a known bug, and one which I've hit a few times before, and just like you I resolved it by making manual edits to the designer files if rebuilding the solution doesn't work, or if it's unwilling to compile.

Btw, sorry, but I didn't see your second post, and if you look at the time stamp, you replied just 2/3 minutes before I posted mine, and closed out the window.

Glad you got it working, but I would advise you to not get overly confident when it comes to renaming anything in a winforms solution, as it is known to be very flaky and I've seen people loose entire projects when the designer crashes out on them and refuses to load the changes made. You also won't have problems like that in WPF, and while its probably not optional to use WPF now, it is what you should be basing your new projects on.
 
I am also running the latest version of VS, and I just did what you said and i didn't experience any problems like you have reported. This is however a known bug, and one which I've hit a few times before, and just like you I resolved it by making manual edits to the designer files if rebuilding the solution doesn't work, or if it's unwilling to compile.

Btw, sorry, but I didn't see your second post, and if you look at the time stamp, you replied just 2/3 minutes before I posted mine, and closed out the window.

Glad you got it working, but I would advise you to not get overly confident when it comes to renaming anything in a winforms solution, as it is known to be very flaky and I've seen people loose entire projects when the designer crashes out on them and refuses to load the changes made. You also won't have problems like that in WPF, and while its probably not optional to use WPF now, it is what you should be basing your new projects on.

I've had a few problems with the designers, usually because ive had to change an object somewhere and then the designer won't load, usually i just delete the resx file and rec-create it and most problems go away. I'm not familiar with WPF but i guess i need to try it out. Not sure how much time it would take to change my project, its just a spare time thing im doing and not related to my day job (im not a professional programmer). The current porject is about 100,000 lines of code so would not like to lose it but if converting some or all of it to WPF would make things more stable or have other benefits then i'm not opposed to it.

Edit: On the other hand i've written quite a lot of stuff thats makes usinng winforms quick and easy to link up data interactively, kind of like data binding on various custom objects so i can build forms linked to my data quickly so changing anything at this stage would be too time consuming. Im more focused on number crunching and probaly more interested in converting any bottlenecks into C++ or finding some other way to speed things up.
 
Last edited:
Back
Top Bottom