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 missing version in the csproj file.
Adding the version fixed the issue.
I also had this problem after installing a new version of .Net Core (2.0 to 2.1). The below link gave me a hint of what caused the problem.
https://github.com/dotnet/cli/issues/9433
The solution for me was to change the project's Target Framework to the latest installed .Net Core version.
Project Properties > Application > Target Framework