Under Installation - search for "templates", select this option to install (older) .NET templates
After VS 2022 restarts, you can search for "MVC" and select the "ASP.NET" templates for .NET 4.8 Web
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have .net framework 4.8 installed but when i start up visual studio and try to create a project using it, it seems to want to force me to use .net core 6. How can I create a .net framework 4.8 web project?
Or can .net core 6 run the .net framwork 4.8?
Under Installation - search for "templates", select this option to install (older) .NET templates
After VS 2022 restarts, you can search for "MVC" and select the "ASP.NET" templates for .NET 4.8 Web
I found out that the template has to be installed separately from the Visual Studio installer, which is accessible at the bottom of the list of installed templates. You have to select "INdividual Components."
You're using the wrong project template. That is really easy to do in Visual Studio. .NET Framework web apps that are based on MVC should be using the ASP.NET Web Application (Net Framework)
template. Any templates referring to Core
are for .NET 6+. Because of the massive amount of changes (and project formats) between the 2 you cannot easily convert between the 2 templates. Create a new project and copy over any existing code you might have written if you used the wrong template otherwise you are going to run into issues.
Note that you can sort of figure out whether a template is targeting .NET 6+ or .NET Framework by the tags. .NET Framework will list Windows
as the only platform while .NET 6+ templates generally refer to multiple platforms Windows
, Linux
, macOS
.
After installing 4.8 or one of the older versions, you must choose a template that says (.Net Framework) or is for Windows only. The boxes of what it supports should only have C# and WIndows. It shouldn't show Linux, Mac, or any other operating system. Otherwise, it will only show versions of .Net that are multi-platform.