Open Closed

DbMigrator Failing on New Project #10561


User avatar
0
maggieryanmail@gmail.com created

I created a new solution and ran the DbMigrator project and it is not working. It says "Creating initial migration" then "Process finished with exit code 0."

  • Exception message and full stack trace:

    • When running DbMigrator:
      • [09:43:59 INF] Workspace saving is disabled, skipping initial workspace update
      • [09:43:59 INF] Creating initial migration...
      • Process finished with exit code 0.
  • Steps to reproduce the issue:

    • Create new solution
    • Run DbMigrator
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

1 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent
    • In ABP 10.1.1, the .DbMigrator output you shared (it stops right after “Creating initial migration…” and returns exit code 0) typically means the “create initial migration” step didn’t actually scaffold any EF Core migration, so the migrator ends without applying anything (no error is thrown, so the process exits successfully).

    • Fix it by creating/applying the initial EF Core migration manually (this bypasses the Studio/CLI “create initial migration” wrapper and makes the failure visible if there is any design-time DbContext issue):

      1. Open a terminal in your *.EntityFrameworkCore project folder.

      2. Run Add Migration (use your actual DbContext name):

    dotnet ef migrations add Initial --context YourProjectDbContext
    
    1. Then update the database:
    dotnet ef database update --context YourProjectDbContext
    
    1. After the database is created and migrations exist, run the .DbMigrator project again. It should now apply migrations + seed data normally.
    • If step (2) fails, EF Core will print the real root cause (most commonly: a design-time DbContext creation/mapping problem). In that case, the correct fix is to resolve the EF Core model/design-time error and then re-run the commands above. (In ABP v10.x, some module entity changes can require adding migrations after package updates—see the migration guides below.)

    Links (validated):

    • https://abp.io/docs/10.1/release-info/migration-guides/abp-10-0
    • https://abp.io/docs/10.1/release-info/migration-guides/abp-10-1

    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)
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 28, 2026, 11:44
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.