How to use Authorization namespace in a shared Razor Class Library Project?
问题 I can use the Microsoft.AspNetCore.Components.Authorization namespace in my Blazor Server Project. However, I can't get it to work in my Razor Class Library project. I even added the same Nuget Libraries and mirrored the _Imports.razor file, but the library project doesn't recognize this namespace. Is there some limitation or am I doing something wrong? 回答1: The namespace name usually matches an Assembly and a Package. You can easily find out with the F12 key or consult the docs. The page you