Open Closed

Append-a-new-Blazor-project-to-existing-microservice-solution #8034


User avatar
1
carl.hallqvist created
  • ABP Framework version: v8.3
  • UI Type: Blazor WASM
  • Database System: EF Core
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes/no
  • Exception message and full stack trace:
  • Steps to reproduce the issue: Hi,

We have previously used ABP 7, but now we created an ABP 8.3 microservice template, and it looked different.

Specifically, the Blazor WASM application was missing when adding a new microservice according to: https://abp.io/docs/latest/solution-templates/microservice/adding-new-microservices#adding-a-new-microservice

How do you add a Blazor project in an added microservice?

Additionally, there are two projects in the /apps/blazor directory, ProjectName.Blazor.Client and ProjectName.Blazor. How does the Blazor project in the microservice appends as dependency project in /apps/blazor (like it did in ABP 7)?

Thank you in advance for your help.


6 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    there are two projects in the /apps/blazor directory, ProjectName.Blazor.Client and ProjectName.Blazor.

    This is the new Blazor web app template. see https://abp.io/docs/latest/release-info/migration-guides/abp-8-2-blazor-web-app

    You can create a new template project just as your current project type. then compare the code.

    Thanks

  • User Avatar
    0
    carl.hallqvist created

    Thank you,

    But does this mean that I shouldn’t partition out Blazor code into the different microservices (as in ABP 7), but rather put all the Blazor code under apps/blazor/ProjectName.Blazor and apps/blazor/ProjectName.Blazor.Client?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you create a new ms project and select blazor wasm as UI type to check the new design?

    Thanks.

  • User Avatar
    0
    carl.hallqvist created

    Sure, here is the structure (creating a new ms template, then using ABP Studio to generate the customer microservice).

    Edit: Updated screenshot

    I am not sure where to place the ABP 7 projects:

    services/customer/src/GeoTicket.CustomerService.Domain, services/customer/src/GeoTicket.CustomerService.Domain, services/customer/src/GeoTicket.CustomerService.Domain.Shared, services/customer/src/GeoTicket.CustomerService.Application, services/customer/src/GeoTicket.CustomerService.Application.Contracts, services/customer/src/GeoTicket.CustomerService.HttpApi, services/customer/src/GeoTicket.CustomerService.HttpApi.Client, services/customer/src/GeoTicket.CustomerService.HttpApi.Host

    in the new ABP 8.3 structure. Please help me map those projects to the new directories / projects in the screenshot.

    Thanks :-)

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Add your module xxx.EntityFrameworkCore xxx.Application xxx.HttpApi to GeoTicket.CustomerService

    add your module xxx.Application.Contracts to GeoTicket.CustomerService.Contracts

    add your module xxx.Blazor.WebAssembly customer/GeoTicket.CustomerService.Contracts/GeoTicket.CustomerService.cspro to apps\blazor\xxx.Blazor.Client\xxx.Blazor.Client.csproj

    And depends on the necessary modules.

    You can check the file-management service to know the project structure.

  • User Avatar
    0
    carl.hallqvist created

    Thanks,

    It seems to work. However, the migration from < 8.2 to 8.2 is not very straightforward. Think it need some more documentation, the templates that was created for ABP 7 was a much easier.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35