添加初始迁移实体框架7

时间:2015-12-28 15:38:51

标签: asp.net-mvc entity-framework

当我尝试创建初始迁移时,我遇到了错误

comnand prompt

我添加了命令和依赖项

  "dependencies": {

    "jQuery": "2.1.4",
    "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
    "Microsoft.AspNet.Mvc": "6.0.0-rc1-final",
    "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-final",
    "Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final",
    "EntityFramework.Core": "7.0.0-rc1-final",
    "EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final",
    "EntityFramework.Commands": "7.0.0-rc1-final",
    "Microsoft.AspNet.Hosting": "1.0.0-rc1-final",
    "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final"
  },

  "commands": {
    "web": "Microsoft.AspNet.Server.Kestrel",
    "ef": "EntityFramework.Commands"
  },

任何想法为什么?

1 个答案:

答案 0 :(得分:1)

我能够使用此命令行解决此问题

dnvm use 1.0.0-rc1-update1
dnx ef migrations add Initial