Share via

Visual Studio 2022 Enterprise cannot create an ASP.NET using .NET8

Lu, Xinghua 0 Reputation points
2025-02-28T16:55:00.5666667+00:00

I use Visual Studio 2022 Enterprise. Try to create an ASP.NET Web application using .NET8 framework. However, .NET8 is not listed in "Targeted framework drop list".

How to create an ASP.NET Web Applicaiton using .NET8 framework?

How to upgrade an app using 4.8 framework to .NET8?

Thanks in advance.

Developer technologies | ASP.NET | ASP.NET Core

2 answers

Sort by: Most helpful
  1. Danny Nguyen (WICLOUD CORPORATION) 6,700 Reputation points Microsoft External Staff Moderator
    2025-07-07T09:20:08.62+00:00

    Hi,

    Visual Studio 2022 does not support ASP.NET Web Forms or classic ASP.NET (.NET Framework 4.x) with .NET 8. Instead, .NET 8 is used with ASP.NET Core templates like:

    • Razor Pages
    • MVC
    • Web API
    • Blazor
    • Empty (minimal API)

    If you're trying to use the old "ASP.NET Web Application (.NET Framework)" template, it won't support .NET 8.

    Steps to Enable .NET 8 in Visual Studio 2022

    Install .NET 8 SDK

    • Download from the official .NET download page.
      • Make sure it's installed correctly by running:
             dotnet --list-sdks
        

    Modify Visual Studio Installation

    • Open Visual Studio Installer.
    • Click Modify on your Visual Studio 2022 installation.
    • Ensure the following workloads are checked:
      • ASP.NET and web development
        - **.NET 8 SDK**
        
        
        
              - Optionally, **.NET 9 Preview SDK** if you're testing future versions.
        
        
        
              **Restart Visual Studio**
        
        
        
                 - After installation, restart Visual Studio to refresh the template list.
        
    • Use ASP.NET Core Templates
      • Go to Create a new project.
      • Search for:
      • ASP.NET Core Web App (Model-View-Controller)
      • ASP.NET Core Empty
      • ASP.NET Core Web API
      • Select one and choose .NET 8.0 as the target framework.

    Upgrading from .NET Framework 4.8 to .NET 8

    This depends on the type of application:

    • MVC apps: Can often be ported with moderate effort.
    • Web Forms apps: Require a full rewrite (e.g., to Razor Pages or Blazor).
    • Tips for Migration:
    • Refactor reusable code into .NET Standard 2.0 libraries.
      • Create a new ASP.NET Core project and migrate features incrementally.
    1 person found this answer helpful.

  2. Bruce (SqlWork.com) 83,821 Reputation points
    2025-02-28T19:18:49.9066667+00:00

    the asp.net web applications (net framework) template is for old 4.* asp.net applications and does not support .net8

    there are several asp.net templates for .net8; razor page, mvc, web api, react, angular, gpc, etc. use "asp.net core" in the search box.

    upgrading to .net8 depends on your code. MVC applications port typically without a lot of recoding. webform applications require a complete rewrite (typically to razor page applications). generally its easier to create a new .net core application, and add the controller and views one at a time from the old application, or convert webform page to razor page.

    see:

    https://learn.microsoft.com/en-us/aspnet/core/migration/proper-to-2x/?view=aspnetcore-9.0

    hint: refractor all possible code to libraries, and update all libraries to .netstandard 2.0 which is supported by both old and new projects.

    0 comments No comments

Your answer

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