Yesterday, I installed the Visual Studio 2022 Community edition and noticed it was missing ASP.NET template for .NET Framework. I was not able to create either ASP.NET MVC or ASP.NET Web Forms web project. I was only able to find the ASP.NET Core related templates. This article will show how I was able to solve the problem.
In the "Create new project" window, I searched for "framework" keyword to list only the .NET Framework related templates and it showed me the ones for Windows Forms, WPF, console, and Class Library, but there was no ASP.NET Web Application (.NET Framework) template.
I decided to check the installed components for the "ASP.NET and web development" workload. To do that, we need to run the Visual Studio installer.
Checking the Visual Studio installer
If we scroll all the way to the bottom of the list of available templates, we can click on the "Install more tools and features" link, which will open the Visual Studio Installer.
Looking at the installed components of the ASP.NET and web development workload I didn't see anything that might indicate a reason for the missing ASP.NET template since I could see that the .NET Framework was already installed.
But then, I checked the "Individual components" tab of the Visual Studio Installer.
Individual components for .NET
Inside the .NET group, below the ".NET Framework 4.8 targeting pack", there is a component named ".NET Framework project and item templates" and this component was not selected.
Hovering over the component, the tooltip describes it as:
Enables .NET Framework project templates, item templates & related features for .NET Framework development.
This component looked like exactly what could solve the problem, so I selected and installed it.
Installing .NET Framework project and item templates added 1.6GB of space required, which might be the reason for not being included by default in the first place during the Visual Studio 2022 install.
ASP.NET .NET Framework template not missing anymore
After installation, I launched Visual Studio 2022 and again searched for the "framework" keyword in the search box and this time the ASP.NET Web Application for the .NET Framework template was finally listed.
When we install Visual Studio, not all project templates might be listed. In my case, it was missing the ASP.NET template for .NET Framework. Luckily, this was easily solved by modifying the Visual Studio installation and installing the missing ".NET Framework project and item templates" component.