- ABP Framework version: v9.0.0
- UI Type: Blazor
- Database System: EF Core (SQL Server)
- Tiered (for MVC) or Auth Server Separated (for Angular): yes/no
- Exception message and full stack trace: Invalid namespace
- Steps to reproduce the issue: generate new module
When generating a module
abp add-module {ModuleName} --new --add-to-solution-file -t module-pro -u blazor -v 9.0.0
In the {ModuleName}.Blazor project, in the Pages folder, a folder {ModuleName} is generated containing a file index.razor (the sample page for the module)
Problem with this is that the namespace for this page is not specified and will be based on the folder-structure:
{ModuleName}.Blazor.Pages.{ModuleName}
This causes a kind of circular reference and causes all kinds of problems when referencing anything in the {ModuleName}.Blazor namespace
If I then create a folder within the Pages folder, for instance ControlLayout And I create a new Razor page there And I add
@using {ModuleName}.Blazor.Pages.ControlLayout
I get a red-squigly line under 'Blazor' part of the namespace and my project won't compile.
if I reference other projects starting their namespace with {ModuleName} I get similar problems
Setting the namespace for this Samplepage, adding the following line to the index.razor seems to solve the problem.
@namespace VitruviusBase.Blazor.Pages.SamplePage
I do have a sample project demonstrating this, so if it's helpful I can send it.