How to add an implementation of IDesignTimeDbContextFactory to add migration to .Net core 2.0 application?

后端 未结 3 1041
眼角桃花
眼角桃花 2021-01-17 21:16

I am trying to run Add-Migration InitialCreate command from package manager console from a .NET Core 2.0 MVC application. After looking at all possible sources still not abl

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-17 22:05

    I had the same issue

    My solution contained a console application and an api application which contained the dbcontext code.

    I had set the start up project to the console application. When I changed the start up project to the api application the error dissapeared.

提交回复
热议问题