In questo articolo ti mostriamo come eseguire .NET nel tuo pacchetto di hosting Windows.

Se desideri sviluppare API Web, interfacce utente e altre applicazioni basate su cloud che utilizzano .NET, è necessario inserire questa impostazione nel PropertyGroup del progetto Microsoft Visual Studio ($projectname).csproj) in base alla versione .NET che desideri utilizzare:

.NET 6.0 (LTS)
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
</PropertyGroup>
.NET 7.0
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
</PropertyGroup>

.NET 8.0

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

In questo modo verranno caricati tutti i moduli/pacchetti necessari per l'esecuzione di .NET Core.

Nota bene

Per i tuoi progetti web ti raccomandiamo di utilizzare la versione .NET 8.0.

Per le applicazioni basate ancora su versioni .NET precedenti, Microsoft offre le seguenti guide alla migrazione:

Eseguire la migrazione da ASP.NET Core 3.1 a 6.0

Eseguire la migrazione da ASP.NET Core 5.0 a 6.0

Eseguire la migrazione da ASP.NET Core 7.0 a 8.0