Targeting .Net framework 4.6.1 in a AspNetCore webapp

We want to standardize all our services to use .Net Core.
Some of our services use libraries that must use the full .Net Framework.

I created the web project as follows:

<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
  <TargetFramework>net461</TargetFramework>
</PropertyGroup>

<ItemGroup>
   <Folder Include="wwwroot\" />
    </ItemGroup>
    <ItemGroup>
       <PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="2.0.0" />
      <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.0.0" />
      <PackageReference Include="Microsoft.AspNetCore.Routing" Version="2.0.0" />
       <PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="2.0.0" />
      <PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="2.0.0" />
      <PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.0.0" />
      <PackageReference Include="Microsoft.AspNetCore.Server.Kestrel.Https" Version="2.0.0" />
      <PackageReference Include="servicestack" Version="5.0.0" />
      <PackageReference Include="servicestack.mvc" Version="5.0.0" />
   </ItemGroup>
</Project>

The problem is the following statement:

  app.UseServiceStack(new AppHost());

UseServiceStack is a method that is only supported by .Net Standard 2.0

Is there a way to use ServiceStack in this project?

You can only use ServiceStack’s server .NET Standard libraries with .NET Core only. ServiceStack’s .NET Framework projects cannot reference .NET Standard libraries.