When I ask my Azure DevOps release pipeline to run dotnet MyCompany.MyProject.DbMigrator.dll, the task never terminates, waiting indefinitely for a SIGTERM or Ctrl+C sequence to be sent.
I understand that this is the standard behavior of ConsoleLifetime but how can I run DbMigrator unattended?
Thank you for creating the issue, I also was thinking about that.
We can inject IHostApplicationLifetime into DbMigratorHostedServiceto manually request termination of the current application.
@Stirda Off-topic: Would you mind sharing your yml file for the release pipeline? I am trying to get mine to work but I am confused about deploying the DbMigrator. What steps do you take? Do you first deploy the DbMigrator, execute the dotnet .dll and then deploy the website?
@aklscv I suppose that the ABP team would prefer you create an issue for that. I will answer your question in.
Most helpful comment
We can inject
IHostApplicationLifetimeintoDbMigratorHostedServiceto manually request termination of the current application.