I am surprised the @magicandre1981's advice did not work.
To resolve the "Microsoft.CSharp" warning you should add latest PackageReference of "Microsoft.CSharp" to the project which produces the warning. It will "lock" the package version and remove the warning.
There is more in another answer.
Also I suggest reading Microsoft article about how NuGet dependencies are resolved.