Search code examples
asp.netvisual-studiovisual-studio-2022

ASP.NET web application (.NET Framework)


enter image description here

How can I create an ASP.NET web application (.NET Framework) using Visual Studio 2022 Developer Edition and target .NET Framework 7 or 8, as the current options only include .NET Framework 4.7.2 and 4.8?

My Visual Studio version is 17.8.5

I tried to modify and try to download these version but it didn't work also I tried using (Microsoft.NET.UpgradeAssistant.vsix) but it also didn't work


Solution

  • .NET Framework and .NET are two different frameworks.

    For details, please refer to: https://learn.microsoft.com/en-us/dotnet/standard/choosing-core-framework-server

    The .NET Framework 7 and 8 you are talking about should be .NET 7.0 and .NET 8.0.

    If you are creating ASP.NET with .NET 7.0 and .NET 8.0, you should select the ASP.NET Core project type when creating the project:

    enter image description here

    This way you can choose .NET 7.0 or .NET 8.0.

    enter image description here

    If you still cannot find .NET 7.0 and .NET 8.0, it should be that you have not installed .NET 7.0 and .NET 8.0. You can use Visual Studio Installer to install .NET 7.0 and .NET 8.0.

    enter image description here

    enter image description here