Skip to content

Document breaking changes for MigrationsNotFound default throw and EFOptimizeContext removal#5282

Merged
AndriySvyryd merged 8 commits intopreview-3from
copilot/document-breaking-changes
Mar 5, 2026
Merged

Document breaking changes for MigrationsNotFound default throw and EFOptimizeContext removal#5282
AndriySvyryd merged 8 commits intopreview-3from
copilot/document-breaking-changes

Conversation

Copy link
Contributor

Copilot AI commented Mar 4, 2026

Documents two EF Core 11 breaking changes in entity-framework/core/what-is-new/ef-core-11.0/breaking-changes.md:

  • Low impact — MigrationsNotFound now throws by default (efcore#35218): RelationalEventId.MigrationsNotFound changed from Information log to Error with default Throw behavior, consistent with the PendingModelChangesWarning treatment from EF 9.0. Mitigation:

    options.ConfigureWarnings(w => w.Ignore(RelationalEventId.MigrationsNotFound))
  • Low impact — EFOptimizeContext MSBuild property removed (efcore#35079): Redundant property removed; EFScaffoldModelStage and EFPrecompileQueriesStage are the sole controls for code generation. PublishAOT=true enables generation automatically during publish.

Also updates the MSBuild integration page (entity-framework/core/cli/msbuild.md) to note that EFOptimizeContext only applies to EF Core 9-10 and was removed in EF Core 11.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…MigrationsNotFound throw (#35218)

Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Copilot AI changed the title [WIP] Document breaking changes from recent EF Core pull requests Document breaking changes for MigrationsNotFound default throw and EFOptimizeContext removal Mar 4, 2026
…new behavior text

Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR documents two new EF Core 11 breaking changes in the existing breaking-changes.md page. The entries describe: (1) MigrationsNotFound event now throwing by default instead of logging informational message, and (2) removal of the redundant EFOptimizeContext MSBuild property.

Changes:

  • Added a medium-impact breaking change entry for MigrationsNotFound default throw behavior, including migration guidance using ConfigureWarnings
  • Added a low-impact breaking change entry for EFOptimizeContext removal, documenting the replacement properties EFScaffoldModelStage and EFPrecompileQueriesStage
  • Updated the summary table at the top of the page with links to both new entries

You can also share your feedback on Copilot code review. Take the survey.

@AndriySvyryd AndriySvyryd marked this pull request as ready for review March 4, 2026 23:01
@AndriySvyryd
Copy link
Member

@copilot Also update the MSBuild integration page, noting that the changes only apply for 11+

…EF Core 11

Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 4, 2026

@copilot Also update the MSBuild integration page, noting that the changes only apply for 11+

Updated the MSBuild integration page (entity-framework/core/cli/msbuild.md) in 2009bbd. Added version-specific notes:

  • EFOptimizeContext: marked as "EF Core 9-10 only; removed in EF Core 11"
  • EFScaffoldModelStage and EFPrecompileQueriesStage: added notes about EF Core 9-10 requiring EFOptimizeContext vs EF Core 11+ working independently
  • Added a [!NOTE] block linking to the breaking changes documentation

Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
…egration page

Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
@roji roji assigned AndriySvyryd and unassigned roji Mar 5, 2026
@AndriySvyryd AndriySvyryd removed their assignment Mar 5, 2026
Updated the mitigation section to clarify how to handle calling Migrate without migrations.
@AndriySvyryd AndriySvyryd merged commit e93c96b into preview-3 Mar 5, 2026
2 of 3 checks passed
@AndriySvyryd AndriySvyryd deleted the copilot/document-breaking-changes branch March 5, 2026 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants