Skip to content
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

[release/9.0] Set environment variables to "Development" when creating DbContext using IDesignTimeDbContextFactory #35230

Open
wants to merge 1 commit into
base: release/9.0-staging
Choose a base branch
from

Conversation

AndriySvyryd
Copy link
Member

Fixes #35174

Description

In EF 9.0 we added a short-circuit that avoids creating an AppHost when creating a DbContext using IDesignTimeDbContextFactory. But this had an unintended side effect of no longer setting the environment variables ASPNETCORE_ENVIRONMENT and DOTNET_ENVIRONMENT to Development

Customer impact

Code that relied on a specific environment is broken. A workaround is to set the environment variables manually.

How found

Customer reported on 9.

Regression

Yes, from 8.

Testing

Tests fixed.

Risk

Low.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants