在服务器上运行Ef核心迁移

问题描述 投票:1回答:1

有没有人知道如何在VS 2017的服务器上运行EF核心命令。

我在服务器上安装了SDK 2.0.3。

我从源代码文件夹运行此命令:

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

并得到此错误:

没有找到任何项目。更改当前工作目录或使用--project选项。

asp.net entity-framework asp.net-core entity-framework-core
1个回答
1
投票

试试这个:

复制此文件的内容

  • ef.dll
  • ef.runtimeconfig.json

从:

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

到您的源文件,在管理员模式下打开命令提示符,指向您的源文件文件夹并再次运行您的命令

© www.soinside.com 2019 - 2024. All rights reserved.