9 Answer(s)
-
0
- The error "DbMigrator is not found!" indicates that the ABP CLI or Studio could not locate the DbMigrator project in your solution. This typically happens if the DbMigrator project is missing, not built, or not referenced correctly in your solution.
How to resolve:
- Ensure the
DbMigrator
project exists in your solution directory. - Make sure the project is included in your solution file (
.sln
). If not, right-click the solution in Visual Studio and add the existing project. - Build the entire solution to ensure the
DbMigrator
executable is generated. - If you renamed or moved the
DbMigrator
project, update all references and paths accordingly. - Run the DbMigrator either from the command line or directly from Visual Studio as documented.
# Example: Run from command line dotnet run --project path/to/YourProject.DbMigrator
Reference:
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.
-
0
Just to confirm, I confirmed that DbMigrator project exists, it is visible from my solution, I set it as startup project and attempted to run, I rebuilt by solution to check for errors or incompatibilities, and I attempted to run DbMigrator directly from command line. I also restarted Visual Studio just in case that was causing issues. So I think something is broken.
-
0
hi
Do you have an EF Core migrations file in your EF Core project?
Thanks.
-
0
Yes, I created a new migration using "dotnet ef migrations add " followed by the migration name. That looks fine, as it shows the field I was adding.
-
0
-
0
Hmm, it seems to be running now, but isn't playing nice with the migrations. It was throwing an exception saying it can't add a table that already exists. So I deleted all the existing migrations and the DbContextModelSnapshot (perhaps I shouldn't have done this but I thought it would reset it since it seems to be out of sync with the db), and made a new migration. I assumed it would recognize what is in the table and bring up a migration with just the differences, but it is wanting to insert all of the tables again. I'm not sure how this went wrong.
-
0
hi
Your app will add initial EF Core migrations if it doesn't exist.
If you want to remove all migrations, Just delete
Migrations
folder.BTW, there is an empty
Armada.EntityFrameworkCore
folder. Maybe you can try to remove it, I think this is why the app can't find the right folder.Thanks.
-
0
I did end up cleaning up my project a bit, but I realized that the issue was the the __EFMigrations table was inconsistent with the migrations I had. I have no idea how that occurred (different ids), but I renamed some of my migrations to match, and had to comment out some code in one of the migrations that was already in the db. A bit hacky but I got it working. This is just a local dev environment so worst case scenario I can always drop the db and start over, but this is working for now.
Thanks for your help.
-
0
Great : )