最近项目中使用Autofuc实现依赖注入时出现错误:
None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'PoyaYun.Controllers.MainController' can be invoked with the available services and parameters:
None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'PoyaYun.Controllers.MainController' can be invoked with the available services and parameters:
Cannot resolve parameter 'PoyaYun.IBLL.IAnalysisBll bll' of constructor 'Void .ctor(PoyaYun.IBLL.IAnalysisBll)'.
经查找资料原来是接口的实现忘记继承接口导致的。