Add NoBuild parameter to Add-Migration PMC command#38658
Open
AndriySvyryd with Copilot wants to merge 2 commits into
Open
Add NoBuild parameter to Add-Migration PMC command#38658AndriySvyryd with Copilot wants to merge 2 commits into
NoBuild parameter to Add-Migration PMC command#38658AndriySvyryd with Copilot wants to merge 2 commits into
Conversation
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
Copilot
AI
changed the title
Add NoBuild parameter to Add-Migration PMC command
Add Jul 15, 2026
NoBuild parameter to Add-Migration PMC command
Copilot created this pull request from a session on behalf of
AndriySvyryd
July 15, 2026 23:32
View session
There was a problem hiding this comment.
Pull request overview
Adds a -NoBuild switch to the EF Core Package Manager Console Add-Migration command so PMC users can skip the Visual Studio solution build step (similar in intent to dotnet ef ... --no-build), helping scenarios where rebuilding is unnecessary or problematic.
Changes:
- Added
[switch] $NoBuildtoAdd-MigrationinEntityFrameworkCore.psm1and forwarded it to the internalEFhelper via-skipBuild:$NoBuild. - Added the same parameter to the PowerShell 2 stub (
EntityFrameworkCore.PS2.psm1) so the command surface accepts it (even though the stub still throws). - Updated parameter help text to document
NoBuild.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/EFCore.Tools/tools/EntityFrameworkCore.psm1 | Adds -NoBuild to Add-Migration and forwards it to the internal EF helper to conditionally skip the build step. |
| src/EFCore.Tools/tools/EntityFrameworkCore.PS2.psm1 | Updates the PS2 stub signature/help to include -NoBuild to prevent argument rejection. |
Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com>
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.
Add-Migrationlacked a-NoBuildswitch, unlikedotnet ef migrations add --no-build, leaving PMC users unable to skip the build step when the project is already up-to-date.This is useful as a workaround for issues like #38572
Changes
EntityFrameworkCore.psm1: Added[switch] $NoBuildparameter toAdd-Migration; passes-skipBuild:$NoBuildto the internalEFhelper to conditionally skip the solution buildEntityFrameworkCore.PS2.psm1: Added$NoBuildto the PS2 stub's signature (stub always throws "upgrade PowerShell"; parameter presence prevents argument rejection).PARAMETER NoBuildhelp comment in both filesUsage