与dotnet ef的问题

时间:2017-05-05 11:25:56

标签: entity-framework asp.net-core

我因为移动到ef核心1.1.0而遇到了dotnet ef的问题。我习惯使用Microsoft.EntityFrameworkCore.Tools中的Add-Migration,但显然不能使用ef 1.1.0。然后我更改为Microsoft.EntityFrameworkCore.Tools.DotNet以使用dotnet ef,但我收到以下消息 - >找不到匹配命令“dotnet-ef”

的可执行文件

我尝试了其他主题的几个提示,但没有一个对我有用。我的project.json文件是

{
  "dependencies": {
    "Microsoft.NETCore.App": {
      "version": "1.1.1",
      "type": "platform"
    },
    "Microsoft.AspNetCore.Diagnostics": "1.1.1",
    "Microsoft.AspNetCore.Server.IISIntegration": "1.1.1",
    "Microsoft.AspNetCore.Server.Kestrel": "1.1.1",
    "Microsoft.Extensions.Logging.Console": "1.1.1",
    "Microsoft.AspNetCore.Razor.Tools": {
      "version": "1.0.0-preview4-final",
      "type": "build"
    },
    "Microsoft.AspNetCore.StaticFiles": "1.1.1",
    "Microsoft.AspNetCore.Mvc": "1.1.2",
    "Microsoft.Extensions.Configuration.Json": "1.1.1",
    "Microsoft.EntityFrameworkCore.SqlServer": "1.1.1",
    "Microsoft.EntityFrameworkCore.Tools.DotNet": "1.0.0-preview4-final"
  },

  "tools": {
    "Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview4-final",
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final",
    "Microsoft.EntityFrameworkCore.Tools.DotNet": "1.0.0-preview4-final"
  },

  "frameworks": {
    "netcoreapp1.0": {
      "imports": [
    "dotnet5.6",
    "portable-net45+win8",
    "dnxcore50"
      ]
    }
  },

  "buildOptions": {
    "emitEntryPoint": true,
    "preserveCompilationContext": true
  },

  "runtimeOptions": {
    "configProperties": {
      "System.GC.Server": true
    }
  },

  "publishOptions": {
    "include": [
      "wwwroot",
      "web.config"
    ]
  }
}

有人有线索吗? THX!

0 个答案:

没有答案