Blazor the type or namespace name 'App' could not be found (are you missing a using directive or an assembly reference?)

前端 未结 5 1761
南旧
南旧 2021-01-18 02:39

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

5条回答
  •  遥遥无期
    2021-01-18 03:11

    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

提交回复
热议问题