Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EF Core Migration Bundles: no way to passthrough custom args to generated efbundle #26945

Closed
bo-bac opened this issue Dec 8, 2021 · 2 comments
Assignees
Labels
area-migrations closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. customer-reported Servicing-approved type-bug
Milestone

Comments

@bo-bac
Copy link

bo-bac commented Dec 8, 2021

I use IDesignTimeDbContextFactory and custom args in CreateDbContext(string[] args)

Then it is possible to apply update like so
`dotnet ef database update -- --environment TEST

It is expected to do the same with bundles
` .\efbundle.exe -- --environment TEST

@ajcvickers
Copy link
Member

Note for triage: repros for me.

PS C:\local\code\AllTogetherNow\SixOh> dotnet ef database update -- --environment TEST
Build started...
Build succeeded.
--environment
TEST
Applying migration '20211217110035_One'.
Done.
PS C:\local\code\AllTogetherNow\SixOh> dotnet ef migrations bundle
Build started...
Build succeeded.
Building bundle...
Done. Migrations Bundle: C:\local\code\AllTogetherNow\SixOh\efbundle.exe
PS C:\local\code\AllTogetherNow\SixOh> .\efbundle.exe -- --environment TEST           
Specify --help for a list of available options and commands.
Unrecognized option '--'
PS C:\local\code\AllTogetherNow\SixOh> .\efbundle.exe --environment TEST   
Specify --help for a list of available options and commands.
Unrecognized option '--environment'
PS C:\local\code\AllTogetherNow\SixOh>

/cc @bricelam

@bricelam
Copy link
Contributor

bricelam commented Jan 4, 2022

Doh, looks like I forgot to set AllowArgumentSeparator to true in MigrationsBundle.Configure.

@bricelam bricelam self-assigned this Jan 4, 2022
@ajcvickers ajcvickers added this to the 6.0.x milestone Jan 5, 2022
bricelam added a commit to bricelam/efcore that referenced this issue Jan 6, 2022
@bricelam bricelam added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Jan 6, 2022
@bricelam bricelam modified the milestones: 6.0.x, 6.0.2 Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-migrations closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. customer-reported Servicing-approved type-bug
Projects
None yet
Development

No branches or pull requests

3 participants