You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
The text was updated successfully, but these errors were encountered: