Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SOLVED: ef core don´t use ASPNETCORE_ENVIRONMENT during update-database

joakimja:

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 have been changed and parameter -Environment have been removed. in docs it said.

"With 2.0, you can use the ASPNETCORE_ENVIRONMENT environment variable instead."

http://ift.tt/2gabXzh

I have now tried on all kind of ways but when i run the update-database with ef core 2.0 it don´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 with updating diffrent environments?

If I start the application with diffrent lanchsettings it works but not using the package manager console.



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
This Question have been answered
HERE


This post first appeared on Stack Solved, please read the originial post: here

Share the post

SOLVED: ef core don´t use ASPNETCORE_ENVIRONMENT during update-database

×

Subscribe to Stack Solved

Get updates delivered right to your inbox!

Thank you for your subscription

×