简体   繁体   中英

Entity Framework error PublicKeyToken=null'

我有两个实体Book.cs和Publisher.cs,还有上下文类,我通过控制器(每个人都准备好了,可以)创建Publisher.cs的CRUD,我现在尝试创建BookController,但出现此错误:

Could not load type 'MvcProject.Models.Publisher' from assembly 'MvcProject, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'

Is the assembly in the GAC or any place the might be overriding the assembly that you think is being loaded? This is usually the result of an incorrect assembly being loaded,

||

If you have one project referencing another project (such as a 'Windows Application' type referencing a 'Class Library') and both have the same Assembly name, you'll get this error. You can either strongly name the referenced project or (even better) rename the assembly of the referencing project (under the 'Application' tab of project properties in VS).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM