Add -NoBuild support to PMC Update-Database#38681
Merged
Merged
Conversation
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix Add-Migration and Update-Database commands failing due to NU1902
Add Jul 21, 2026
-NoBuild support to PMC Update-Database
AndriySvyryd
marked this pull request as ready for review
July 21, 2026 03:03
There was a problem hiding this comment.
Pull request overview
Adds a -NoBuild escape hatch to the Package Manager Console Update-Database command so users can apply migrations without triggering a build (e.g., avoiding NU1902 build blocking), aligning with the existing Add-Migration -NoBuild behavior.
Changes:
- Added
NoBuildswitch and help text toUpdate-Databasein the primary PMC module. - Forwarded
-NoBuildto the shared execution path via-skipBuild:$NoBuild. - Updated the legacy PS2 module signature/help to keep parameter binding consistent across module variants.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/EFCore.Tools/tools/EntityFrameworkCore.psm1 | Adds Update-Database -NoBuild and wires it to the shared EF helper via -skipBuild. |
| src/EFCore.Tools/tools/EntityFrameworkCore.PS2.psm1 | Adds NoBuild to the Update-Database signature/help for compatibility with the PS2 variant. |
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
cincuranet
approved these changes
Jul 21, 2026
This was referenced Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #38677
Update-Databasein Package Manager Console always triggers a build, which can cause the command to stop on NuGet vulnerability warnings likeNU1902even when users only need to apply migrations. This alignsUpdate-Databasewith the existingAdd-Migration -NoBuildescape hatch.PMC command surface
NoBuildswitch parameter toUpdate-DatabaseinEntityFrameworkCore.psm1.-skipBuild:$NoBuild.Help text
NoBuildin both scripts forUpdate-Database.