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.
Conclusion
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.
Rahul S
November 14, 2021Thanks a lot for your help... God bless...
V
November 18, 2021Worked for me.
Fritz
November 19, 2021Thanks, Thanks, Thanks !!! First the nuget site in nuget packages was not installed (only Microsoft at least in my case), and now this ... they want to kill the .Net Framework at any cost ;-(
Oscar
November 21, 2021Thanks, it worked!
Sidhant
November 26, 2021Thank you so much!
Francesco
November 27, 2021Thank you!
Pouypm
November 29, 2021".NET Framework project and item templates" is not display for me ... Not worked for me ... Maybe i have 17.0.1 ? ...
admin
November 29, 2021On VS 17.0.1, I can still see the component.
Inside "Individual components", what component do you have under ".NET Framework 4.8 targeting pack" component?
Valeriy
November 29, 2021Thank you so much, it was extremely helpful!
Vinnie
December 3, 2021Thanks - much appreciated 🙂
Brazilian Boy
December 4, 2021Thanks!!!
Taniya
December 6, 2021Thanks a lot. It worked for me.
Allan Jonathan
December 9, 2021Thanks a ton. This fix solved my other issue while creating a controller.
With Regards,
Allan Jonathan T
JJ
December 10, 2021Thanks! I'm currently using the Visual Studio 2022 and .NET Framework project and item templates wasn't installed initially. After installing it, it solves the issue.
Anders
December 10, 2021Thank you so much!
Brijesh
December 14, 2021Thank you
Bouchra
December 18, 2021THAANK YOUUUU !!!!!!
Tharaka
December 20, 2021Thanks Mate, it worked!
Frane
December 20, 2021Thank you
Thank You!
December 21, 2021Thank you soooo much!!!
Md Rifat Islam Rakesh
December 29, 2021It saved my life! Thanks a lot
Jimmy Smith
December 31, 2021If you still can't get it to show, make sure you install .NET 5 Components under "Individual Components", then it will show.
Pat
January 1, 2022Thank you very much, still have to create/maintain legacy code as well in VS 2022.
Long
January 4, 2022Thank you very much
John Dev
January 6, 2022Super Helpful! Thanks
Jacob S
January 9, 2022super helpful, thank you!
Firas
January 9, 2022Thanks, you've saved my day
LynneC
January 16, 2022tyty. I had reviewed the Individual Components tap during initial install, but my eye didn't catch the templates option.
CesaR560
January 18, 2022Thank you so much!!!! It was driving me crazy that I couldn't use the template.
nge90
January 18, 2022Thank you for the help!!
Wesam
January 23, 2022Thank you for your help
God bless
Shalza
January 26, 2022Thank you so much
Dan
January 27, 2022I'm so happy this was the first result in google when I searched for:
"visual studio 2022 create a blank asp.net 4.8 application"
I hate how things like this are never simple with visual studio..
Rohan
January 31, 2022thanks a lot man!
Michele
February 4, 2022Thanks for the solution!
Adolfo Ruiz
February 21, 2022Mil gracias por la información!!!! Fue de bastante ayuda.
Ron
February 27, 2022Thank you!
GW
February 28, 2022This worked! Thank you so much.
Samed
March 9, 2022Thanks. This was helpful.
Ishaq
March 22, 2022Thanks a Lot
C
March 23, 2022Thanks for the help
Ashraf
April 1, 2022Thank you. I am migrating from visual studio 2019 to 2022 . It works for me to find the asp.net web application. Thank you so much
Runtk
April 1, 2022Thank you , I searched for this many places for this problem I didn't get anywhere, You got the solution.this is the exact problem i faced and exact solution I needed.
Bengi Besçeli
April 3, 2022Thanks a lot. I have found a solution at last!
Trent
April 8, 2022Thank you, Working on a older .net application and needed this.
John
April 29, 2022Excellent - exactly the problem I was having, and a simple, well described solution.
greatly appreciated 🙂
Hamdan
May 17, 2022THANK YOU SO MUCH !
john
June 9, 2022I dont have it..
Liya
June 18, 2022Thank you very much.
Neal
July 15, 2022Having followed all these steps I can find the C# versions of web templates but not the Visual Basic versions!
Anyone know how to get this. I am a teacher with 30+ students and in September they need to be able to do this stuff (this is my last year of using Visual Basic, please help
admin
July 15, 2022Hi,
What happens if you search for "framework" but also select "Visual Basic" from the "Languages" dropdown menu?
In my case, among other things, I get ASP.NET Web Application (.NET Framework) template listed.
The template has the following tags listed:
-Visual Basic
-Windows
-Cloud
-Web
sales
July 27, 2022Thanks a lot. I was able to get this to work.
Mark
August 17, 2022Man you're a genius. Thank you!!
Jay
September 6, 2022After enabling this web forms does not appear.
admin
September 6, 2022To create "Web Forms" project, you need to first create "ASP.NET Web Application (.NET Framework)" and then in the final step select "Web Forms" project template.
Joop
September 18, 2022Wow saved me a few hairs ... which I was pulling out of my head 🙂
Kamilo
September 22, 2022And for MacOs? Some idea? Don’t appear the options to install individual components, I need the template for ASP.NET web again!
admin
September 22, 2022Hi,
According to this StackOverflow answer, .NET Framework is not supported for MacOS since .NET Framework is Windows specific.
You could try to install Mono. Here is an article (not sure when it was written) that explains how to open existing .NET Framework project using Mono on MacOs.
Vladyslav
September 26, 2022Thank you for this info
Vaughan
September 28, 2022Thanks. The missing templates caused me a big headache until I found your solution.
KC
October 3, 2022You're a lifesaver! Thank you!
Pooja Naregal
December 7, 2022Thank you so much...
nanthakumar
December 9, 2022Really awesome, thanks for the wonderful help.
om prakash shrivastava
December 27, 2022Thank You,
It solved my problem.
with regards
om prakash shrivastava
Ed
January 9, 2023Thanks a bunch lot
Joel R
January 17, 2023Worked for me. Many thanks!!!
Alik
February 13, 2023Thanks!
JB
March 2, 2023Thank you for the solution.
Microsoft idiots wasted us tons of time.
Md Adil
March 14, 2023I installed ASP Web Application (.Net framework), after when I am creating project then it shows error Error HRESULT E_Fail has been returned from call to COM component.
admin
March 16, 2023Hi,
You can try different things to fix this issue. You could try to either Repair or Update the Visual Studio or if this doesn't work, you could try to clear the VS Component cache at
C:\Users\[username]\AppData\Local\Microsoft\VisualStudio\17.0_xxxxxxxx\ComponentModelCache
.