EF7: The term 'add-migration' is not recognized as the name of a cmdlet

后端 未结 6 1335
傲寒
傲寒 2021-01-01 22:02

I have framework version set to: dnx46 in project.json. Also have the following packages:

  \"dependencies\": {
    \"EntityFramework.Commands\": \"7.0.0-rc1         


        
6条回答
  •  难免孤独
    2021-01-01 22:29

    As ErikEJ mentioned, there is no "enable-migrations". You will need to use "Add-Migrations" instead. See official docs for EF Core's Powershell commands here: http://docs.efproject.net/en/latest/cli/powershell.html

    There appears to be a bug in NuGet and Package Manager Console in some versions of Visual Studio. If cmdlets are not recognized after adding the Commands package, try restarting VS.

    Also, dnx commands will not be supported after RC1. New (forthcoming) dotnet tooling will be available for RC2. See https://github.com/aspnet/EntityFramework/issues/3925

提交回复
热议问题