6

I'm trying to install EntityFramefork on one of my solutions but Package Manager Console can't recognie Enable-Migrations.

PM> Enable-Migrations Enable-Migrations : The term 'Enable-Migrations' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a pa th was included, verify that the path is correct and try again. At line:1 char:1 + Enable-Migrations + ~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Enable-Migrations:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException 

enter image description here

project.json { "version": "1.0.0-*", "compilationOptions": { "emitEntryPoint": true }, "dependencies": { "EntityFramework": "6.1.3", "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final", "Microsoft.AspNet.Mvc": "6.0.0-rc1-final", "Microsoft.AspNet.Mvc.WebApiCompatShim": "6.0.0-rc1-final", "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final", "Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final", "Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0-rc1-final", "Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final", "Microsoft.Extensions.Logging": "1.0.0-rc1-final", "Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final", "Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final", "Newtonsoft.Json": "10.0.2" }, "commands": { "web": "Microsoft.AspNet.Server.Kestrel" }, "frameworks": { "dnx451": { "dependencies": { "Application": "1.0.0-*", "Microsoft.AspNet.WebApi.Client": "5.2.3", "Models": "1.0.0-*", "Newtonsoft.JsonResult": "1.0.5778.10762" } } }, "exclude": [ "wwwroot", "node_modules" ], "publishExclude": [ "**.user", "**.vspscc" ] } 

I followed these steps from different threads as well with no success: 1. Reinstalled EF with the -IncludePrerelease 2. Restarted VS with administrator privilege

Package Manager Console Enable-Migrations CommandNotFoundException only in a specific VS project

1 Answer 1

9

EF Core does not have Enable-Migrations command anymore. Migrations are enabled "by default". Add new migration with Add-Migration.

Documentation about package manager commands is here

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.