This version of the Entity Framework Core Package Manager Console Tools doesn't support these types of projects -


after updating existing project asp.net core 1.1 , entity framework core 1.1 using tutorial
tried execute "add-migration migrationname" in package management console got error:

startup project 'src\projectname' asp.net core or .net core project visual studio 2015. version of entity framework core package manager console tools doesn't support these types of projects.

i using vs 2015 update 3.
project.json

{   "dependencies": {     "coursesmanagement.dal": "1.0.0-*",     "microsoft.aspnetcore.diagnostics": "1.1.1",     "microsoft.aspnetcore.identity.entityframeworkcore": "1.1.1",     "microsoft.aspnetcore.mvc": "1.1.2",     "microsoft.aspnetcore.server.iisintegration": "1.1.1",     "microsoft.aspnetcore.server.kestrel": "1.1.1",     "microsoft.aspnetcore.staticfiles": "1.1.1",     "microsoft.extensions.configuration.fileextensions": "1.1.1",     "microsoft.extensions.configuration.json": "1.1.1",     "microsoft.extensions.logging.console": "1.1.1",     "microsoft.entityframeworkcore.sqlserver": "1.1.1",     "microsoft.netcore.app": "1.1.1",     "microsoft.entityframeworkcore": "1.1.1",     "microsoft.entityframeworkcore.tools": {       "version": "1.1.0",       "type": "build"     },     "microsoft.entityframeworkcore.design": "1.1.1"   },    "tools": {     "microsoft.entityframeworkcore.tools": "1.1.0",     "microsoft.aspnetcore.server.iisintegration.tools": "1.0.0-preview2-final",     "microsoft.aspnetcore.razor.tools": "1.0.0-preview2-final"   },    "frameworks": {     "netcoreapp1.1": {       "dependencies": {       },       "imports": [         "dotnet5.6",         "portable-net45+win8"       ]     }   },    "runtimes": {     "win10-x64": {}   },    "buildoptions": {     "emitentrypoint": true,     "preservecompilationcontext": true   },    "runtimeoptions": {     "configproperties": {       "system.gc.server": true     }   },    "publishoptions": {     "include": [       "wwwroot",       "web.config"     ]   },    "scripts": {     "postpublish": [ "dotnet publish-iis --publish-folder %publish:outputpath% --framework %publish:fulltargetframework%" ]   } } 

global.json

{   "projects": [ "src" ],   "sdk": {     "version": "1.0.0-preview2-003131"   } } 

as per official asp.net core team announcement (see github) microsoft.entityframeworkcore.tools package split microsoft.entityframeworkcore.tools , microsoft.entityframeworkcore.tools.dotnet.

you need reference later one, if want continue use dotnet ef commands. if want use old powershell styled commands (database-update, add-migration, etc.) old package should sufficient.

when referencing microsoft.entityframeworkcore.tools.dotnet``there no need reference ``microsoft.entityframeworkcore.tools.

quote rowan miller

if using asp.net core, need update tools section of project.json use new microsoft.entityframeworkcore.tools.dotnet package (rather microsoft.entityframeworkcore.tools package).

"tools": {   "microsoft.entityframeworkcore.tools.dotnet": "1.0.0-preview3-final"  }, 

as design of .net cli tools has progressed, has become necessary separate dotnet ef tools separate package. microsoft.entityframeworkcore.tools still used package manager console commands.

now ef core released should of course

 "tools": {    "microsoft.entityframeworkcore.tools.dotnet": "1.0.0"   }, 

also please note, tools not share version ef itself. latest version of tools still 1.0.0 tools.dotnet(see nuget) , 1.1.0 tools (see nuget again).


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -