这个错误是在nopcommerce中添加了一个service以后,但没有在DependencyRegistrar注册造成的。
None of the constructors found with ‘Autofac.Core.Activators.Reflection.DefaultConstructorFinder’ on type ‘*’ can be invoked with the available services and parameters:
Cannot resolve parameter ‘’ of constructor ‘Void .ctor()’.
- DependencyRegistrar注册
builder.RegisterType<***Service>().As<I***Service().InstancePerLifetimeScope();
构造函数注入 必须注入接口,非实现
接口必须有实现