I have an old WebForms web application project, and would like to add a WebForm to it.
Here’s what I do:
Solution Explorer > Right Click > Add > New Item
There’s no Web Form mentioned there. In VS2019 there is.
So how do I get a new Web Form in VS2022?
2
Answers
Turns out this isn't in the main "Workloads" menu (I did have the ASP.Net workload checked), nor is it under "individual components".
You need to click on the "installation details" pane on the right and expand the ASP.Net details to be able to check and add ".NET Framework and projects..." (I also checked some others there for good measure).
Pretty well hidden, since I'd expect all options to be under "individual components". Oh well...
MSFT like to hide something and waste developers time to find out. Topping up from @ispiro answer, added screenshot to help others easier.
Select the "ASP.Net and web develpment"
On the "Installation details" on the right, expand the "ASP.Net and web development", tick on the ".Net framework project and item template".
Install it.