An assembly specified in the application dependencies manifest (…) was not found

前端 未结 9 516
长发绾君心
长发绾君心 2020-12-23 16:38

I upgraded Microsoft.AspNetCore from 2.0.3 to 2.0.5 and my WebAPI project, although running successfully locally, fails to start in production (IIS). Everything was fine in

9条回答
  •  囚心锁ツ
    2020-12-23 16:50

    If you have more than one project in your solution like me:

    and if you want to scaffold dbcontext in your "non startup" project (InstantOrder.Functions.Data in my case) then you should add the -StartupProject parameter of the Scaffold-DbContext command like this -

    Scaffold-DbContext "Server=..." -Project InstantOrder.Functions.Data -StartupProject InstantOrder.Functions.Data 
    

提交回复
热议问题