I have setup the basic application in Blazor in Microsoft Visual Studio Community 2019 Version 16.1.3 and I have tried both of the versions of .NET Core SDK 3.0.100-preview5
After migrating my .NET Core 3.1 application to .NET 5.0 I experienced the same problem. My application was working just fine but since I opened my App.razor file errors showed.
"the type or namespace name 'pageName' could not be found" and the pages show normally.
Fixed the problem with Tools -> Options -> Environment -> Preview Features -> Use previews of the .NET Core SDK. Restart of Visual Studio and reloading project was also needed.
Which is kind of weird since I just moved to .NET 5.0