Add-Migration showing error EntityFrameworkCore.Design is not installed
Check that your project.json contains these entries
under dependencies:
"Microsoft.EntityFrameworkCore.Design": {
"version": "1.0.0-preview2-final",
"type": "build"
},
"Microsoft.EntityFrameworkCore.SqlServer": "1.0.1",
under tools:
"Microsoft.EntityFrameworkCore.Tools": {
"version": "1.0.0-preview2-final",
"imports": [
"portable-net45+win8+dnxcore50",
"portable-net45+win8"
]
},
First, this document using VS2015 Update2 and current latest version for VS2015 is Update 3. So I suggest you upgrade your VS2015 to Update 3, which has fixed a lot of VS bugs.
Then according to the tutorial, I get the same error message when I run the command Add-Migration MyFirstMigration. Then I run command "Install-Package Microsoft.EntityFrameworkCore.Design" in Package Manager Console to install the EntityFrameworkCore.Design. After install it, when I run the command Add-Migration MyFirstMigration, it added successful.
Following is my project.json file content. Please check the dependencies and tools version. Make sure they are in correct versions.
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.0",
"type": "platform"
},
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.EntityFrameworkCore.SqlServer": "1.0.1",
"Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview3-final",
"Microsoft.EntityFrameworkCore.Design": "1.0.1"
},
"tools": {
"Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview2-final",
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
},