I try to update my .net solution from .NET Core 1.1 to .NET Core 2.1. I have several .NET Core and .NET standard projects inside, which reference each other and another NuGe
I had a similar issue to you. Could not publish my project when I specified a runtime identifier.
The solution I got to work was to add in the following line to the *.csproj
true
After that line was added the project would publish correctly.
The below link references a downgrade issue between 2.1.1 and 2.1.0 but the solution worked the same.
https://github.com/dotnet/cli/issues/9624