Using .NET Core with Windows Hosting Packages
For Windows Hosting Packages
In this article, we will show you how to run the .NET Core in your Windows hosting package.
If you want to develop Web APIs, user interfaces, and other cloud-based applications using .NET Core, you must first add this setting to the PropertyGroup of your Microsoft Visual Studio project ($projectname).csproj).
.NET Core 3.1
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
</PropertyGroup>
.NET Core 5.0
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
</PropertyGroup>
.NET Core 6.0
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
</PropertyGroup>
This will load all of the necessary modules/packages that are required to run the .NET Core.