For Windows Hosting Packages

In this article, we will show you how to run the .NET in your Windows hosting package.

If you want to develop Web APIs, user interfaces, and other cloud-based applications using .NET, you must first add this setting to the PropertyGroup of your Microsoft Visual Studio project ($projectname).csproj).

.NET 8 LTS (Long Term Support)

<PropertyGroup>
  <TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

.NET 9

<PropertyGroup>
  <TargetFramework>net9.0</TargetFramework>
</PropertyGroup>

This will load all of the necessary modules/packages that are required to run the .NET Core.

Note

For applications still based on earlier .NET versions, Microsoft provides the following migration guides:

Migrate from ASP.NET Core 6.0 to 7.0
Migrate from ASP.NET Core in .NET 7 to .NET 8
Migrate from ASP.NET Core in .NET 8 to ASP.NET Core in .NET 9