I had the same issue, and the Core 2.2 did not show up on the Visual Studio in the Target platforms dropdown. I did everything answered above and still had the same issue.
Finally I ended up creating a new global json config using
dotnet new globaljson --sdk-version 2.2.101 --force
Restarting Visual Studio after the above step worked for me.