How to create a .net framework 4.8 web project using visual studio

Anna Naden 1 Reputation point
2022-07-08T13:19:22.167+00:00

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?

Developer technologies .NET Other
{count} votes

4 answers

Sort by: Most helpful
  1. SCOTT CONNORS 15 Reputation points
    2023-07-15T20:52:09.9866667+00:00

    Under Installation - search for "templates", select this option to install (older) .NET templatesUser's image

    After VS 2022 restarts, you can search for "MVC" and select the "ASP.NET" templates for .NET 4.8 Web

    User's image

    3 people found this answer helpful.
    0 comments No comments

  2. Anna Naden 1 Reputation point
    2022-07-08T13:41:54.19+00:00

    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."

    0 comments No comments

  3. Michael Taylor 60,161 Reputation points
    2022-07-08T14:06:26.06+00:00

    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.

    0 comments No comments

  4. Stewart Scott 0 Reputation points
    2023-03-17T23:14:28.67+00:00

    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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.