Skip to content

dotnet ef6 (Migrations commands on projects without Visual Studio) #1053

@bricelam

Description

@bricelam

In EF Core, we introduced dotnet ef which enabled Migrations commands (Add-Migration, Update-Database, etc.) outside of Visual Studio and on other platforms like macOS and Linux.

As part of #231, we introduced the underlying ef6 command which is cross-platform but works directly with assemblies instead of project files (csproj, vbproj, etc). For example, the equivalent of Update-Database would be...

dotnet exec \
  --depsfile ./bin/Debug/netcoreapp3.0/MyApp.deps.json \
  --runtimeconfig ./bin/Debug/netcoreapp3.0/MyApp.runtimeconfig.json \
  ~/.nuget/packages/entityframework/6.3.0/tools/netcoreapp3.0/any/ef6.dll \
  --assembly ./bin/Debug/netcoreapp3.0/MyApp.dll \
  database update

Obviously, this isn't very user friendly compared to a simple dotnet ef6 database update, but it is possible. You can also get the exact command to run by adding -Verbose to the PMC commands since they are also backed by this same underlying command.

Is this enough or should we introduce dotnet ef6? How many EF6 projects will be developed without using Visual Studio?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions