This issue is reported on the Blazor GitHub issue 1424 but do not do as suggested and delete your global.json file.
The solution is to modify your global.json file to have your installed SDK version.
I've got dotnet 2.1.3 installed and 2.1.300 uin my Balzor project's global.json file, and am getting the same error
It turns out I've got '2.1.500-preview-009297' of the dotnet SDK!
To find the highest version of the dot net SDK run this script in the Powershell ISE:
$runtimes = [Collections.Generic.List[string]];
$runtimes = (ls "$env:programfiles/dotnet/shared/Microsoft.NETCore.App").Name
$runtime = $runtimes[$runtimes.Length-1]
$runtime
cd $env:programfiles/dotnet/shared/Microsoft.NETCore.App
cd $runtime
dotnet --version
copy and paste the last string into your global.json file:
{
"sdk": {
"version": "highest sdk version"
}
}