All of the tutorials that I have seen use ASP.NET Web application (.NET Framework) template in Visual Studio to create webforms projects. But Visual Studio 2022 does not come with ASP.NET Web application (.NET Framework) template. I understand that we can get that option by adding additional components in Visual Studio 2022, however my question is that can we create a webforms project using some of the default templates available in VS 2022?
Can I create a Web Forms application project using "Empty Project (.NET Framework)" template? If yes, how to do that?
Since the templates and webforms is quite old? And since Visual Studio gets a boatload of features every year?
Well, after 20+ years, Visual Studio has become massive, but absolute massive.
So, by default, not all of the webforms templates are installed.
You need to add a few more workflows and templates.
So, from VS, tools->Get Tools and Features.
Make sure you selected these:
The "class designer" of course does not matter, but it is nice to have. Same goes for the RDLC Report Designer if you used the web-based report builder in the past.
And in the above list, I recommend all of the Optional choices I have in above.
Once done, then you find the traditional WebForms "web site" option (I recommend you don't use such projects), and you find the WebForms web site Application which is of course the recommended type of project to choose when building web forms applications.
Thus choose 1 of theses (vb.net, or c#).
So, starting out with a blank (empty) asp.net webforms application?
The process of adding references is much the same as when building some desktop software, or even console applications. Or even building a .net class project without any UI at all.
So, we can create a blank (empty) new web project with the above choice:
Hence this:
Then next and this:
And then this choice:
So, you probably can un-check the https setting.
So, now with above, we have a blank empty project.
And to add references, then you can simple right click on references in the project explorer, and choose to add.
The process looks like this:
So, how to add additional assemblies and references to a project is not any different when building desktop software, console applications, or as in this example, working with an empty asp.net application.