Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions entity-framework/core/cli/powershell.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ Parameters:
| <nobr>`-Name <String>`</nobr> | The name of the migration. This is a positional parameter and is required. |
| <nobr>`-OutputDir <String>`</nobr> | The directory use to output the files. Paths are relative to the target project directory. Defaults to "Migrations". |
| <nobr>`-Namespace <String>`</nobr> | The namespace to use for the generated classes. Defaults to generated from the output directory. |
| <nobr>`-NoBuild`</nobr> | 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.

Expand Down Expand Up @@ -319,6 +320,7 @@ Updates the database to the last migration or to a specified migration.
| <nobr>`-Add`</nobr> | 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. |
| <nobr>`-OutputDir <String>`</nobr> | The directory to put migration files in. Paths are relative to the target project directory. Requires `-Add`. Added in EF Core 11. |
| <nobr>`-Namespace <String>`</nobr> | The namespace to use for the generated migration classes. Requires `-Add`. Added in EF Core 11. |
| <nobr>`-NoBuild`</nobr> | 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.

Expand Down
19 changes: 19 additions & 0 deletions entity-framework/core/what-is-new/ef-core-11.0/whatsnew.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

<a name="pmc-nobuild"></a>

### `-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).

<a name="dotnet-ef-context-wildcard"></a>

### Wildcard context support for migration commands
Expand Down