-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Migration scripts are always generated for "Development" environment #11950
Comments
You can manually set the |
I don't call |
Interesting. We may need to add an option to the publish dialog for this... |
To work around this, you can set the environment variable before launching Visual Studio when publishing: SET ASPNETCORE_ENVIRONMENT=Production
devenv |
We were going to follow up with the Web Publish team about adding an option in the UI to specify the environment. |
@mlorbetske is now tracking this in his list. Clearing up fields to decide what to do with this issue. |
And? how do I change between environments? You can't just say "this is solution" but then not show how it works. If I manually change the variable (ew!) then it stays changed no matter what mode I run visual studio in. Please be specific, and clear, in your answers. Also when writing @microsoft docs. We ain't all geniuses with 30 years experience. |
dotnet ef migrations script
always defines Development environmental variable. For applications that use InMemory EF provider when running in Development mode by defining multipleConfigure{EnvironmentName}Services
blocks this creates a problem, especially when trying to publish to Azure.Steps to reproduce
Problem is visible in https://github.com/dotnet-architecture/eShopOnWeb when trying to publish on azure and apply migrations on publish.
Further technical details
EF Core version: 2.0.2
Database Provider: Mixed
Operating system:
IDE: Visual Studio 2017 15.6.2
The text was updated successfully, but these errors were encountered: