Elena Maximova Elena Maximova - 11 months ago 138
ASP.NET (C#) Question

Running Ef core migration on the server

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.

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download