Running Ef core migration on the server

asp.net asp.net-core entity-framework entity-framework-core

Question

Does any know how to run EF core command on a server with VS 2017.

I have SDK 2.0.3 installed on the server.

I ran this command from source code folder:

dotnet exec --depsfile auth.deps.json --runtimeconfig auth.runtimeconfig.json ef.dll migrations list --assembly auth.dll

and got this error:

No project was found. Change the current working directory or use the --project option.

1
1
12/22/2017 9:24:21 PM

Accepted Answer

Try this:

Copy the content this files

  • ef.dll
  • ef.runtimeconfig.json

From:

C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.entityframeworkcore.tools.dotnet\2.0.0\tools\netcoreapp2.0

to your source files, open command prompt in admin mode, point to you source file folder and run your command again

1
12/22/2017 10:06:00 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow