EFCore中的数据迁移命令失败

时间:2016-10-29 00:26:05

标签: entity-framework migration

我无法运行此命令:" dotnet ef migration add"。我收到错误消息" Unhandled Exception:System.MissingMethodException:在程序集中找不到入口点' Microsoft.EntityFrameworkCore.Design,Version = 1.0.1.0,Culture = neutral,PublicKeyToken = adb9793829ddae60'。& #34 ;. 我遇到了this post,但它似乎无法解决我的问题。 下面是我的project.json文件。

     "buildOptions": {
    "emitEntryPoint": true,
    "preserveCompilationContext": true
    },
    "dependencies": {
    "Microsoft.NETCore.App": {
      "version": "1.0.1",
      "type": "platform"
    },
    "Microsoft.AspNetCore.Mvc": "1.0.1",
    "Microsoft.AspNetCore.Routing": "1.0.1",
    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
    "Microsoft.Extensions.Configuration.FileExtensions": "1.0.0",
    "Microsoft.Extensions.Configuration.Json": "1.0.0",
    "Microsoft.Extensions.Logging": "1.0.0",
    "Microsoft.Extensions.Logging.Console": "1.0.0",
    "Microsoft.Extensions.Logging.Debug": "1.0.0",
    "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
    "ReportBook.Data": "1.0.0-*",
    "Microsoft.EntityFrameworkCore.SqlServer": "1.0.1",
    "Microsoft.AspNetCore.Diagnostics": "1.0.0",
    "Microsoft.AspNetCore.Http.Abstractions": "1.0.0",
    "Microsoft.AspNetCore.Diagnostics.Abstractions": "1.0.0",
    "ReportBook.Repository": "1.0.0-*",
    "Microsoft.AspNetCore.Authentication": "1.0.0",
    "Microsoft.AspNetCore.Authentication.Cookies": "1.0.0",
    "Microsoft.AspNetCore.Authentication.OpenIdConnect": "1.0.0",
    "Repository.Pattern.EFCore": "1.0.0-*",
    "ReportBook.Service": "1.0.0-*",
    "Microsoft.AspNetCore.Identity": "1.0.0",
    "AspNet.Security.OAuth.Validation": "1.0.0-alpha2-final",
    "Microsoft.AspNetCore.Mvc.ViewFeatures": "1.0.1",
    "AspNet.Security.OAuth.Introspection": "1.0.0-alpha2-final",
    "Microsoft.AspNetCore.Authentication.Google": "1.0.0",
    "Microsoft.AspNetCore.Authentication.Twitter": "1.0.0",
    "Microsoft.EntityFrameworkCore": "1.0.1",
    "Microsoft.EntityFrameworkCore.DynamicLinq": "1.0.3",
    "Microsoft.ApplicationInsights.AspNetCore": "1.0.2",
    "IdentityServer4": "1.0.0-rc2",
    "SimpleIdentityServer.Authentication.Common": "1.0.0",
    "Microsoft.AspNetCore.Authorization": "1.0.0",
    "IdentityServer4.AccessTokenValidation": "1.0.1-rc2",
    "System.Security.Cryptography.X509Certificates": "4.1.0",
    "Microsoft.AspNetCore.DataProtection.Extensions": "1.0.0",
    "Microsoft.AspNetCore.DataProtection.Abstractions": "1.0.0",
    "Microsoft.AspNetCore.DataProtection": "1.0.0",
    "Microsoft.NETCore.Platforms": "1.0.1",
    "NETStandard.Library": "1.6.0",
    "Microsoft.EntityFrameworkCore.Design": {
      "type": "build",
      "version": "1.0.1"
    },
    "Microsoft.EntityFrameworkCore.Relational": "1.0.1"
     },
     "frameworks": {

      "netcoreapp1.0": {
      "imports": [
        "dotnet5.6",
        "portable-net45+win8"
      ]
    }
    },
     "publishOptions": {
    "include": [
      "wwwroot",
      "**/*.cshtml",
      "appsettings.json",
      "web.config"
    ]
    },
      "runtimeOptions": {
      "configProperties": {
        "System.GC.Server": true
      }
       },
      "scripts": {
        "postpublish": [ "dotnet publish-iis --publish-folder    %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
     },
     "tools": {
       "Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview2-final",
       "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
     }
   }

0 个答案:

没有答案