I have a project that targets two different operating systems/frameworks:
net461
netcoreapp2.0
Can you try to target .NET Standard 2.0 instead of net461 and netcoreapp2.0? Libraries built against netstandard2.0 should work with .NET Core 2.0 and .NET Framework 4.6.1: https://docs.microsoft.com/en-us/dotnet/standard/net-standard