TypeLoadException because of a file in controller?

独自空忆成欢 提交于 2021-01-29 18:50:29

问题


I keep getting this error

TypeLoadException: Could not load type 'projectname.AuthenticationApi.Controllers.LoggedOutViewModel' from assembly 'projectname.AuthenticationApi, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

It doesnt make sense to me. Once I have this project referenced in another project I get this error. If I dont have it referenced there is no error and all is well. I am making an asp.net core api which references this project. Everytime I try to start it I get this error. If I dont reference it there is no error.

I looked in the controller file it mentions and there doesnt seem to be anything wrong there since its working when its not referenced.

来源:https://stackoverflow.com/questions/58546514/typeloadexception-because-of-a-file-in-controller

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