I created a new microservice and also generated a Blazor Server UI project for it. Then, I updated the frontend configuration of this new service in the .abp/suite/appsettings.json file to point to the newly created Pbys.Blazor.Server project instead of the existing microservice Blazor Server project.
However, when I try to build the solution, I get the following error:
Cannot find pbysMenuContributor.cs file! Ensure ..\AbpSolution12\apps\Pbys\AbpSolution12.Blazor.Server\Menus\pbysMenuContributor.cs exists.
6 Answer(s)
-
0
Can you please provide your solution structure and build logs here?
Does dotnet CLI say Menucontributor not found? Or you did not found it?
build operation doesn't look for a specific file unless you define its name in the csproj file. You can check the related project's csproj file if there is a pbysMenuContributor.cs file defined.
Or like other hand, if you cannot find it in the project, you can create a new one that implements the
IMenuContributor
and configure it in the Module.cs fileConfigure<AbpNavigationOptions>(options => { options.MenuContributors.Add(new MyProjectMenuContributor()); });
-
0
The error message says that the file pbysMenuContributor.cs cannot be found at ..\AbpSolution12\apps\Pbys\AbpSolution12.Blazor.Server\Menus\pbysMenuContributor.cs. However, this is the original Blazor Server project that was automatically created when the microservice was first generated. I have now created a new Blazor Server project, and I want the code to be generated in this new project instead.
-
0
Hi @yunusemrecaglar, Just to clarify—now that you've created a new Blazor Server project, has that resolved your issue, or do you still need assistance? Let us know how we can help.
Otherwise I can refund your ticket and close this issue since it was project generation problem on our side
-
0
The issue is not related to project creation. I can successfully create the project. However, when I try to add a service and create an entity through ABP Suite, the entity is properly added to the initially created Blazor project. But when I try to generate the entity code for a Blazor Server project that I manually added later, I get an error like the one I mentioned earlier.
-
0
Hi again, I reached out to the ABP Suite team, and they clarified that ABP Suite generates code for a single UI—the main UI selected during project creation. However, if you create a module template, Suite can generate code for multiple UIs, but only within the module template.
So, the issue seems to stem from this design choice: ABP Suite is structured to generate code for the primary application UI, not additional UIs added manually later.
-
0
Understood, can you please refund the ticket?