efcore icon indicating copy to clipboard operation
efcore copied to clipboard

Add-Migration Does Nothing

Open elmojo opened this issue 8 years ago • 7 comments

I added Microsoft.EntityFrameworkCore.Tools to my project, used the Package Manager Console, selected the Default Project which contains my context and typed "Add-Migration Initial".

Nothing happens, I just get a new command prompt, nothing is created, no error messages displayed.

elmojo avatar Dec 05 '17 19:12 elmojo

Possible duplicate of #10298 Can you share details of dotnet/ef tools versions? Project type?

smitpatel avatar Dec 05 '17 20:12 smitpatel

Microsoft.EntityFrameworkCore.Tools v2.0.1 .NET Core v.2.0.0 Project Type: class library .NET Core VS: 2017 15.4.5

elmojo avatar Dec 05 '17 20:12 elmojo

Adding the work around line "<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>" mentioned in #10298 to the project file got me an error message finally (cannot find appsettings.json).

elmojo avatar Dec 05 '17 20:12 elmojo

Another issue noticed though, I have to have the project with the DatabaseContext selected as the startup project in order to get the migration tool to not fail with a "could not load assembly" error. I've never needed to do this in the past.

elmojo avatar Dec 05 '17 20:12 elmojo

i got the same issue please can anyone help me?

dmuino1986 avatar Mar 23 '18 05:03 dmuino1986

@dmuino1986 Update EF Core pacakges to version 2.0.2.

bricelam avatar Mar 23 '18 16:03 bricelam

thanks bricelam it work

dmuino1986 avatar Mar 24 '18 15:03 dmuino1986