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

Environment is not settable via argument #4802

Open
houbi56 opened this issue Sep 10, 2024 · 0 comments
Open

Environment is not settable via argument #4802

houbi56 opened this issue Sep 10, 2024 · 0 comments

Comments

@houbi56
Copy link

houbi56 commented Sep 10, 2024

Type of issue

Code doesn't work

Description

ASP.NET Core environment
You can specify the environment for ASP.NET Core projects on the command-line. This and any additional arguments are passed into Program.CreateHostBuilder.

PowerShell

Copy
Update-Database -Args '--environment Production'

[Enter feedback here]

This doesn't work. When running this command in the VS PMC environment has no effect on the host.
dotnet/efcore#9623
dotnet/efcore#9664
dotnet/efcore#8328

Please update documentation on how to correctly set the environment.
My code uses the IDesignTimeDbContextFactory

Page URL

https://learn.microsoft.com/en-us/ef/core/cli/dbcontext-creation?tabs=dotnet-core-cli

Content source URL

https://github.com/dotnet/EntityFramework.Docs/blob/main/entity-framework/core/cli/dbcontext-creation.md

Document Version Independent Id

d988e806-cb86-19f5-7f76-6ce3bfcd94ed

Article author

@bricelam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant