I use visual studio to update all my environments with a certain migration. It had worked fine using the command below.
update-database -Migration initMigrationProduct -c ProductContext -Environment Production
In ef core 2.0 this command has been changed and parameter -Environment has been removed. In the docs it said.
"With 2.0, you can use the ASPNETCORE_ENVIRONMENT environment variable instead."
https://learn.microsoft.com/en-us/ef/core/miscellaneous/cli/dotnet
I have now tried all kinds of ways but when I run the update-database
with ef core 2.0 it doesn't use the ASPNETCORE_ENVIRONMENT
variable. I tried to set in registry, application properties.
Please let me know what I need to do to get this working to update different environments?
If I start the application with different launchsettings
it works but not using the package manager console.