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

前端 未结 5 1738
南旧
南旧 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:03

    
    

    The error I got (using Visual Studio 2019 v16.8.2 & .NET 5 in a Blazor Server App) was pointing to the "App" part of the line above (in the file _Host.cshtml). This happened after copying in some code from another project, and encountering issues with a different (application) namespace, I got this error (and no others) when trying to build. @SᴇM's answer helped me solve the problem - I closed and re-opened my solution, and then got namespace errors when building - which I could resolve... after fixing that it worked.

    I would have commented to @SᴇM's solution, but I don't have enough 'reputation'.

提交回复
热议问题