我想将 Blazor 服务器项目中的Shared
文件夹重命名为Components
,如何才能正确执行此操作?似乎命名空间基于文件夹名称,但一定有一种方法吧?
您可以将文件夹重命名为组件。这确实会更改命名空间,请像这样编辑_Imports.razor
文件:
@*@using MyApp.Shared*@ -- remove this line
@using MyApp.Components