EF Core Migration: Could not load assembly 'AssemblyName'

落爺英雄遲暮 提交于 2020-07-07 05:38:05

问题


The command "Add-Migration InitialCreate" generates the following error message:

Could not load assembly 'MathModelApp'. Ensure it is referenced by the startup project 'MathModelApp'.

What does the error message mean?

I am using netcore 2.1, Target Platform is x86.


回答1:


Please go to solution property and check if you selected same project as the startup project in the solution or not.




回答2:


  1. Right Click on EndPoint Project
  2. Click on the Set As Startup Project


来源:https://stackoverflow.com/questions/53521473/ef-core-migration-could-not-load-assembly-assemblyname

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!