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 2.1
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
</PropertyGroup>
.NET Core 3.1
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
</PropertyGroup>

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