You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building a Bundle to apply migrations to another machine, the force option fails to overwrite an existing bundle if you are specifying a custom output directory for the bundle.
The bundle fails to build if an existing bundle exists
Building bundle...
System.IO.IOException: Cannot create a file when that file already exists.
at System.IO.FileSystem.MoveFile(String sourceFullPath, String destFullPath, Boolean overwrite)
at Microsoft.EntityFrameworkCore.Tools.Commands.MigrationsBundleCommand.Execute(String[] args)
at Microsoft.EntityFrameworkCore.Tools.Commands.CommandBase.<>c__DisplayClass0_0.<Configure>b__0(String[] args)
at Microsoft.DotNet.Cli.CommandLine.CommandLineApplication.Execute(String[] args)
at Microsoft.EntityFrameworkCore.Tools.Program.Main(String[] args)
Cannot create a file when that file already exists.
Running the same option without an output directory works as expected with no errors
dotnetef migrations bundle -f
Building bundle...
Done. Migrations Bundle: C:\PublishTestDirecory\efbundle.exe
Don't forget to copy appsettings.json alongside your bundle if you need it to apply migrations.
Include provider and version information
Entity Framework Core .NET Command-line Tools 8.0.4
EF Core version: 8.0.4
Database provider: (e.g. Pomelo.EntityFrameworkCore.MySql)
Target framework: (e.g. .NET 8.0)
Operating system: Windows
IDE: (e.g. Visual Studio 2022 17.9.6)
The text was updated successfully, but these errors were encountered:
When building a Bundle to apply migrations to another machine, the force option fails to overwrite an existing bundle if you are specifying a custom output directory for the bundle.
The bundle fails to build if an existing bundle exists
Running the same option without an output directory works as expected with no errors
Include provider and version information
Entity Framework Core .NET Command-line Tools 8.0.4
EF Core version: 8.0.4
Database provider: (e.g. Pomelo.EntityFrameworkCore.MySql)
Target framework: (e.g. .NET 8.0)
Operating system: Windows
IDE: (e.g. Visual Studio 2022 17.9.6)
The text was updated successfully, but these errors were encountered: