Open Closed

Cannot Add ABP Module Navigation Properties in Custom Modules (Works in Main Solution) #10628


User avatar
0
abpdevPro created

Hi Team,

We are facing an issue with ABP Suite when trying to add ABP module entities as navigation properties inside our custom modules.

What works: When importing ABP modules into the main solution and adding them as navigation properties on entities — this works correctly without any issues.

What doesn't work: When importing the same ABP modules inside a custom module (a separate module in the solution), we are unable to see or add ABP module entities as navigation properties on entities within that module.

What we tried:

  1. Added the ABP package reference directly inside the custom module project
  2. Re-opened ABP Suite after adding the reference
  3. Still unable to select ABP module entities as navigation properties in the Suite UI

Expected Behavior: After adding the ABP package reference in a custom module, ABP Suite should recognize and expose the ABP module entities as available navigation property targets for entities within that module — consistent with how it behaves in the main solution.

Environment:

  1. ABP Suite Version: [your version]
  2. ABP Framework Version: [your version]
  3. Project Type: Modular / DDD
  4. DB Provider: [EF Core / MongoDB]

Steps to Reproduce:

  1. Create a custom module in ABP Suite
  2. Add an ABP package reference (e.g., Volo.Abp.Identity) to the module
  3. Open an entity in that module in ABP Suite
  4. Attempt to add a navigation property pointing to an ABP module entity (e.g., IdentityUser)
  5. The ABP entity does not appear as an option

Please advise on whether there's a specific configuration required to enable this at the module level, or if this is a known limitation/bug.

Thank you

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
    • This is a known limitation of ABP Suite’s navigation-property discovery in modular solutions: Suite primarily detects “existing entities” (like IdentityUser) from the main solution’s module/package graph and the standard layered projects, but it doesn’t reliably surface entities coming only from a referenced ABP module package inside a separate custom module in the way you expect.

    • Workaround (supported by Suite): add the navigation property manually instead of relying on the dropdown list.

      1. In ABP Suite, open your entity → Navigation PropertiesAdd Navigation Property.
      2. In the “Existing Entity” selector, if IdentityUser doesn’t appear, use the manual entry approach described in the Suite docs (“Alternatively, you can add IdentityUser … by manually entering the required information”).
      3. Provide the required information for:
        • Target entity type (e.g., Volo.Abp.Identity.IdentityUser)
        • FK property (e.g., IdentityUserId / UserId as Guid)
        • Display property and DTO info as needed by Suite’s generation logic.
    • After generation, if you hit EF Core mapping errors when relating to module entities (commonly around ExtraProperties), ensure your module’s DbContext model configuration includes the module mappings before configuring your own entities (e.g., the relevant builder.ConfigureIdentity() / builder.ConfigureIdentityPro() calls depending on what you use). This is a separate runtime concern from Suite’s UI not listing the entity, but it’s a common follow-up when adding relations to IdentityUser.

    • If you need Suite to list those module entities in the UI for custom modules specifically: there is no verified configuration switch/documented setting that enables that behavior today; the practical approach is the manual navigation-property entry.

    Links (verified):

    • https://abp.io/docs/latest/suite/generating-crud-page
    • https://abp.io/community/articles/furp75ex

    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
    maliming created
    Support Team Fullstack Developer

    Hi,

    This is by design, not a bug. Adding a NuGet <PackageReference> is not the same as installing a module on the solution from ABP Suite's perspective — Suite only auto-loads entities from modules that were registered via "Install module on solution".

    For custom modules, Suite provides an official extension point: the .suite/module-entity-extension.json file at the root of your module solution. Add the Domain DLL file names of the ABP modules you want to expose as navigation property targets. Example:

    {
      "Modules": [
        { "DomainProjectDllFileName": "Volo.Abp.Identity.Pro.Domain.dll" }
      ]
    }
    

    Then in the Add Navigation Property dialog, check the Include entities from ABP modules checkbox — IdentityUser (and other entities from the listed DLLs) will appear in the dropdown. Suite will automatically build the solution before scanning, so you don't need to build manually, but the DLL has to physically exist somewhere under <solutionRoot>/src/**/bin/... for Assembly.LoadFrom to pick it up. If your module solution has no host project that copies NuGet dependencies to bin, this method won't find the DLL.

    If the DLL approach doesn't work for your project layout, the always-working fallback is to add the navigation property manually — type the target type (Volo.Abp.Identity.IdentityUser), FK property (Guid UserId), display property, etc. directly in the dialog without picking from the dropdown.

    Docs:

    • https://abp.io/docs/latest/suite/generating-crud-page#extending-with-custom-module-entities
    • https://abp.io/docs/latest/suite/generating-crud-page#adding-an-existing-entity-as-a-navigation-property

    Thanks

    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.