Script output ends up in unexpected directory #10036
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-bug
Milestone
I have two projects. For simplicity lets call them Widgets.Core and Widgets.UI. Widgets.Core is a
netstandard2
library and houses all my EF models and DbContexts, so I run my migrations from there. Widgets.UI is my ASP.NET Core front end running on .NET Core 2.I want all my .cs migrations to go to Widgets.Core\Data\Migrations. I also want to generate .sql migrations and have them go to Widgets.Core\Data\Migrations\SQL.
When I'm in the Widgets.Core project at the command land I run:
dotnet ef migrations add MigrationName --startup-project ..\Widgets.UI\Widgets.UI.csproj --output-dir Data\Migrations
everything works fineWithin the same directory if I run
dotnet ef migrations script --startup-project ..\Widgets.UI\Widgets.UI.csproj --output Data\Migrations\SQL\MigrationName.sql
This SQL script ends up in the Widgets.UI, not Widgets.Core. I would expect
--output-dir
inef migrations add
to behave the same as--output
inef migrations script
and output in the my current directory, not the directory of my startup project.Obviously I can just .. my way back, but would be nice if these behaved the same.
The text was updated successfully, but these errors were encountered: