Used abp cli to create blazor-server app.
Expected:
source code file names to match namespace names
Observed:
-rw-r--r-- 1 vscode vscode 89 Dec 12 13:47 blazor_server_pwa_no_saas.Blazor.abppkg -rw-r--r-- 1 vscode vscode 4.6K Dec 12 13:40 blazor_server_pwa_no_saas.Blazor.csproj -rw-r--r-- 1 vscode vscode 490 Dec 12 13:40 blazor_server_pwa_no_saasBlazorMappers.cs -rw-r--r-- 1 vscode vscode 18K Dec 12 13:55 blazor_server_pwa_no_saasBlazorModule.cs -rw-r--r-- 1 vscode vscode 640 Dec 12 13:40 blazor_server_pwa_no_saasBrandingProvider.cs -rw-r--r-- 1 vscode vscode 370 Dec 12 13:40 blazor_server_pwa_no_saasComponentBase.cs
Note the missing . (dot) in 4 file names.
2 Answer(s)
-
0
- Solution
This is a known naming quirk in some ABP CLI template versions where the generated Blazor Server project omits the dot between the solution name and the “Blazor*” suffix for a few files. It does not affect runtime, but you can safely fix the names to match the namespace and other files.
Recommended fix (one-time, manual rename):
- Rename the following files in the Blazor Server project root by inserting a dot before “Blazor”:
- blazor_server_pwa_no_saasBlazorMappers.cs → blazor_server_pwa_no_saas.BlazorMappers.cs
- blazor_server_pwa_no_saasBlazorModule.cs → blazor_server_pwa_no_saas.BlazorModule.cs
- blazor_server_pwa_no_saasBrandingProvider.cs → blazor_server_pwa_no_saas.BrandingProvider.cs
- blazor_server_pwa_no_saasComponentBase.cs → blazor_server_pwa_no_saas.ComponentBase.cs
- No other changes should be needed, since these classes are internal to the project and namespace declarations remain consistent.
- Rename the following files in the Blazor Server project root by inserting a dot before “Blazor”:
If you prefer to regenerate:
- Update ABP CLI to the latest version:
- dotnet tool update Volo.Abp.Cli -g
- Recreate the solution with the same parameters you used. The latest templates are expected to generate correctly named files.
- Alternatively, keep your current solution and only rename the files as above.
- Update ABP CLI to the latest version:
After renaming:
- Clean and rebuild the solution to ensure everything compiles as expected.
- Sources
- Validated: ABP CLI documentation: https://abp.io/docs/latest/cli
- Validated: ABP main docs: https://abp.io/docs/latest/
- Validated: ABP Framework GitHub: https://github.com/abpframework/abp
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
-
0
"If you prefer to regenerate:
Update ABP CLI to the latest version:
dotnet tool update Volo.Abp.Cli -g
Recreate the solution with the same parameters you used. The latest templates are expected to generate correctly named files."
Updated abp cli today, so the latest version has the problem.