Error while validating the service descriptor 'ServiceType


An error occurred while accessing the Microsoft.Extensions.Hosting services. Continuing without the application service provider. Error: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: DuoeCore.ServiceSqlite.Interface.ImAdminUserService Lifetime: Transient ImplementationType: DuoeCore.ServiceSqlite.Implement.mAdminUserService': Unable to resolve service for type 'DuoeCore.DataSqlite.DbContextSqlLite' while attempting to activate 'DuoeCore.ServiceSqlite.Implement.mAdminUserService'.)

出现以上错误问题,发现是我注入的DBContext上下文错误,两个重名的类,不在同一个类库里,本来调用B,结果自动调用了A造成如上错误。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM