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.
- When running DbMigrator:
Steps to reproduce the issue:
- Create new solution
- Run DbMigrator
1 Answer(s)
-
0
In ABP 10.1.1, the
.DbMigratoroutput 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):
Open a terminal in your
*.EntityFrameworkCoreproject folder.Run Add Migration (use your actual DbContext name):
dotnet ef migrations add Initial --context YourProjectDbContext- Then update the database:
dotnet ef database update --context YourProjectDbContext- After the database is created and migrations exist, run the
.DbMigratorproject 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)