The term “Add-Migration” is not recognized

后端 未结 18 2306
情深已故
情深已故 2020-12-07 23:51

I\'m using this MSDN Tutorial to run in VS2015 the command PM> Add-Migration MyFirstMigration -context BloggingContext that ran yesterday successfully but to

18条回答
  •  遥遥无期
    2020-12-08 00:16

    You have to know what is your Entity-Framework version. Also after that you have to check project.json and control these sections:

    In Dependencies

    check:

    Microsoft.EntityFrameworkCore.Tools": {
      "version": "1.0.0-preview2-final",
      "type": "build"
    },
    

    This section:

    "version": "1.0.0-preview2-final",

    is related with version of your Entity-Framework and you have to change this with that.

    After that the second section of the proj.json is here, In the Tools section of JSON you have:

    "Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview2-final",
    

    Also this part of code is related with your Entity-Framework and last part of code in Dependencies section.

    Note: After do this issues you should to close CMD and restart visual studio.

提交回复
热议问题