If you want to do this in .NET Core, do not check the box "Register for COM interop" but put his in your project file instead:
<PropertyGroup>
<EnableComHosting>true</EnableComHosting>
</PropertyGroup>
There's no reason to stick to the old .NET framework.