EntityFramework.Docs icon indicating copy to clipboard operation
EntityFramework.Docs copied to clipboard

Environment is not settable via argument

Open houbi56 opened this issue 1 year ago • 0 comments

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. https://github.com/dotnet/efcore/issues/9623 https://github.com/dotnet/efcore/issues/9664 https://github.com/dotnet/efcore/issues/8328

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

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

houbi56 avatar Sep 10 '24 09:09 houbi56