Try this:
Check that 8.0.xxx version is installed on your pc (add or remove programs, filter by sdk):
if it's not installed, install one from https://dotnet.microsoft.com/en-us/download/visual-studio-sdks
after that go to solution folder and create a global.json file with contents like (version should be of SDK you installed):
{
"sdk": {
"version": "8.0.313"
}
}
more on global.json https://learn.microsoft.com/en-us/dotnet/core/tools/global-json