我的 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预览版,我可以运行这个应用程序,但是为什么级联样式表中有红线呢?
<PackageReference .. />
的ItemGroup
。 - Tewr