How do I add the Windows Form template to A Windows Forms project in VS2019 Professional, C#?

Jon Jacobs 86 Reputation points
2021-11-05T14:30:50.537+00:00

In many of my Windows Forms projects I need to add more Windows forms, usually to do ShowDialog().
So, in an existing Windows Forms project (solution), when I need to add a Form, Add > Form (Windows Forms)
Windows Form is not in the Template list, except as an inherited form under ASP Net Core.
Net Core is not an option for my projects at work. For a number of reasons I will not elaborate here, .Net Framework 4.5.1 is as high as I can go.
Sometimes I hate upgrading. It adds features I don't care about for my job, and takes away or hides features I use every day.

Developer technologies Windows Forms
Developer technologies Visual Studio Other
Developer technologies C#
{count} votes

1 answer

Sort by: Most helpful
  1. Jon Jacobs 86 Reputation points
    2021-11-06T00:01:27.977+00:00

    Thank you. I hadn't thought of that, since I am used to having the templates visible from the start. I just did it, and I could only get forms inherited from another form. Bad news, but I used that, and it gave errors (It couldn't find the constructor it wanted). However, when I edited the code and made it a descendant of Form instead of FormAddProject, and it was fine. Far less than ideal, but at least it is something.

    Why in the world did they take away the straight Windows Form template? It is still needed.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.