From 0c9706983b01a70b261ccf87fac51cb06eea156a Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 28 Jul 2026 00:16:48 +0000
Subject: [PATCH 1/3] Document -NoBuild switch for PMC Update-Database and
Add-Migration
---
entity-framework/core/cli/powershell.md | 2 ++
.../core/what-is-new/ef-core-11.0/whatsnew.md | 19 +++++++++++++++++++
2 files changed, 21 insertions(+)
diff --git a/entity-framework/core/cli/powershell.md b/entity-framework/core/cli/powershell.md
index 307c71e0a3..1f38f1009b 100644
--- a/entity-framework/core/cli/powershell.md
+++ b/entity-framework/core/cli/powershell.md
@@ -124,6 +124,7 @@ Parameters:
| `-Name ` | The name of the migration. This is a positional parameter and is required. |
| `-OutputDir ` | The directory use to output the files. Paths are relative to the target project directory. Defaults to "Migrations". |
| `-Namespace ` | The namespace to use for the generated classes. Defaults to generated from the output directory. |
+| `-NoBuild` | Don't build the project before running the command. Intended to be used when the build is up-to-date. |
The [common parameters](#common-parameters) are listed above.
@@ -319,6 +320,7 @@ Updates the database to the last migration or to a specified migration.
| `-Add` | Creates a new migration and applies it to the database in a single step. Uses Roslyn to compile the migration at runtime. When specified, a migration name is required and provides the name for the new migration. Added in EF Core 11. |
| `-OutputDir ` | The directory to put migration files in. Paths are relative to the target project directory. Requires `-Add`. Added in EF Core 11. |
| `-Namespace ` | The namespace to use for the generated migration classes. Requires `-Add`. Added in EF Core 11. |
+| `-NoBuild` | Don't build the project before running the command. Intended to be used when the build is up-to-date. Added in EF Core 11. |
The [common parameters](#common-parameters) are listed above.
diff --git a/entity-framework/core/what-is-new/ef-core-11.0/whatsnew.md b/entity-framework/core/what-is-new/ef-core-11.0/whatsnew.md
index 8aef322ac0..036cc08aea 100644
--- a/entity-framework/core/what-is-new/ef-core-11.0/whatsnew.md
+++ b/entity-framework/core/what-is-new/ef-core-11.0/whatsnew.md
@@ -899,6 +899,25 @@ Explicit command-line options always take precedence over configuration file val
For more information, see [Configuration file](xref:core/cli/dotnet#configuration-file).
+
+
+### `-NoBuild` for PMC `Update-Database`
+
+> [!NOTE]
+> This feature is being introduced in EF Core 11, which is currently in preview.
+
+The Package Manager Console `Update-Database` command now supports the `-NoBuild` switch, which skips the project build step before applying migrations. This aligns `Update-Database` with `Add-Migration`, which already supported `-NoBuild`.
+
+This is useful when a build succeeds but produces warnings that Visual Studio's Package Manager Console treats as errors (such as NuGet vulnerability warnings), which would otherwise block the command from running:
+
+```powershell
+Update-Database -NoBuild
+```
+
+Only use `-NoBuild` when the project is already up-to-date, since running with a stale build may produce unexpected results.
+
+For more information, see the [PMC tools reference](xref:core/cli/powershell#update-database).
+
### Wildcard context support for migration commands
From 26862147780421c3f73abf8b3fb57ca7389ab463 Mon Sep 17 00:00:00 2001
From: Andriy Svyryd
Date: Tue, 28 Jul 2026 17:17:40 -0700
Subject: [PATCH 2/3] Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
---
entity-framework/core/what-is-new/ef-core-11.0/whatsnew.md | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/entity-framework/core/what-is-new/ef-core-11.0/whatsnew.md b/entity-framework/core/what-is-new/ef-core-11.0/whatsnew.md
index 036cc08aea..a1a7ddad82 100644
--- a/entity-framework/core/what-is-new/ef-core-11.0/whatsnew.md
+++ b/entity-framework/core/what-is-new/ef-core-11.0/whatsnew.md
@@ -903,10 +903,7 @@ For more information, see [Configuration file](xref:core/cli/dotnet#configuratio
### `-NoBuild` for PMC `Update-Database`
-> [!NOTE]
-> This feature is being introduced in EF Core 11, which is currently in preview.
-
-The Package Manager Console `Update-Database` command now supports the `-NoBuild` switch, which skips the project build step before applying migrations. This aligns `Update-Database` with `Add-Migration`, which already supported `-NoBuild`.
+Starting with EF Core 11, the Package Manager Console `Update-Database` command supports the `-NoBuild` switch, which skips the project build step before applying migrations. This aligns `Update-Database` with `Add-Migration`, which already supports `-NoBuild`.
This is useful when a build succeeds but produces warnings that Visual Studio's Package Manager Console treats as errors (such as NuGet vulnerability warnings), which would otherwise block the command from running:
From a37578cf40b378dd9c75149117417be50aec11f2 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 29 Jul 2026 00:20:21 +0000
Subject: [PATCH 3/3] Update -NoBuild docs: Add-Migration also added in EF Core
11
---
entity-framework/core/cli/powershell.md | 2 +-
.../core/what-is-new/ef-core-11.0/whatsnew.md | 9 +++++----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/entity-framework/core/cli/powershell.md b/entity-framework/core/cli/powershell.md
index 1f38f1009b..e254b3d9f1 100644
--- a/entity-framework/core/cli/powershell.md
+++ b/entity-framework/core/cli/powershell.md
@@ -124,7 +124,7 @@ Parameters:
| `-Name ` | The name of the migration. This is a positional parameter and is required. |
| `-OutputDir ` | The directory use to output the files. Paths are relative to the target project directory. Defaults to "Migrations". |
| `-Namespace ` | The namespace to use for the generated classes. Defaults to generated from the output directory. |
-| `-NoBuild` | Don't build the project before running the command. Intended to be used when the build is up-to-date. |
+| `-NoBuild` | Don't build the project before running the command. Intended to be used when the build is up-to-date. Added in EF Core 11. |
The [common parameters](#common-parameters) are listed above.
diff --git a/entity-framework/core/what-is-new/ef-core-11.0/whatsnew.md b/entity-framework/core/what-is-new/ef-core-11.0/whatsnew.md
index a1a7ddad82..5048a89fee 100644
--- a/entity-framework/core/what-is-new/ef-core-11.0/whatsnew.md
+++ b/entity-framework/core/what-is-new/ef-core-11.0/whatsnew.md
@@ -901,19 +901,20 @@ For more information, see [Configuration file](xref:core/cli/dotnet#configuratio
-### `-NoBuild` for PMC `Update-Database`
+### `-NoBuild` for PMC migrations commands
-Starting with EF Core 11, the Package Manager Console `Update-Database` command supports the `-NoBuild` switch, which skips the project build step before applying migrations. This aligns `Update-Database` with `Add-Migration`, which already supports `-NoBuild`.
+Starting with EF Core 11, the Package Manager Console `Add-Migration` and `Update-Database` commands support the `-NoBuild` switch, which skips the project build step before running the command.
-This is useful when a build succeeds but produces warnings that Visual Studio's Package Manager Console treats as errors (such as NuGet vulnerability warnings), which would otherwise block the command from running:
+This is useful when a build succeeds but produces warnings that Visual Studio's Package Manager Console treats as errors (such as NuGet vulnerability warnings), which would otherwise block the commands from running:
```powershell
+Add-Migration MyMigration -NoBuild
Update-Database -NoBuild
```
Only use `-NoBuild` when the project is already up-to-date, since running with a stale build may produce unexpected results.
-For more information, see the [PMC tools reference](xref:core/cli/powershell#update-database).
+For more information, see the [PMC tools reference](xref:core/cli/powershell).