Open Closed

Create Service N Layer #10019


User avatar
0
quannh@csdlquocgia.com created

I created a Microservice project using Abp Studio. I am creating an additional Service in the project but Abp Studio is only providing a no layer structure for Services. If I want to create a Service with an N Layer template, how can I do it?

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

2 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent

    To create a new microservice in an ABP microservice solution using ABP Studio, the default and currently supported approach is to use the "no layers" (service_nolayers) template. ABP Studio does not provide a built-in option to generate a new microservice with a full N-Layer (Domain, Application, EntityFramework, etc.) structure directly from the UI.

    If you require an N-Layer structure for your new service, you have two main options:

    1. Manual Creation:

      • Manually create the required projects (e.g., .Domain, .Application, .EntityFrameworkCore, .HttpApi, etc.) for your new service.
      • Follow the structure of existing layered microservices in your solution.
      • Register dependencies and configure your solution as needed.
    2. Custom Template:

      • Use the ABP CLI to generate a new layered service/module outside the solution, then add it manually to your microservice solution.
      • Example CLI command for a layered module:
    abp new MyCompany.MyService -t module
    
    • Move the generated projects into your solution and update references/configuration.

    Currently, ABP Studio's microservice addition wizard only supports the "no layers" template for new services. For more details and updates, refer to the official documentation below.

    Sources:


    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.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    berkansasmaz created
    Support Team .NET Developer

    Thanks for your question!

    Currently, ABP Studio creates additional services with a minimal structure. You can check the detailed explanation and possible workaround here: 👉 https://abp.io/support/questions/7648/Unable-to-create-layering-for-microservices#answer-3a1447fd-ff9a-f065-3800-a436cfe3d88d

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.