Skip to content

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.

@AndriySvyryd AndriySvyryd merged commit 017e8dc into release/9.0-staging Dec 2, 2024
7 checks passed
@AndriySvyryd AndriySvyryd deleted the Issue35174 branch December 2, 2024 17:51
This was referenced Jul 22, 2025
This was referenced Aug 26, 2025
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