我在 App.razor 上收到此错误:
发现具有意外名称“CascadingAuthenticationState”的标记元素。如果这是一个组件,请为其命名空间添加一个 @using 指令
这是我正在使用的代码
<CascadingAuthenticationState>
<Router AppAssembly="@typeof(Program).Assembly">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
</Found>
<NotFound>
<LayoutView Layout="@typeof(MainLayout)">
<p>Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router>
</CascadingAuthenticationState>
我正在使用 Visual Studio 2019 预览版,我可以运行应用程序,但是为什么我在 Cascading 中有红线......?