I'm going to do some development on NopCommerce 4.0.
I have imported NopCommerce 4.0 source codes into VS 2019. When I try to run my project, all of plugins generate exceptions like this inside Resolve method NopEngine.cs:
public object Resolve(Type type)
{
return GetServiceProvider().GetRequiredService(type);
}
E.g. one of the exceptions is:
'Nop.Plugin.Payments.CheckMoneyOrder.CheckMoneyOrderPaymentProcessor' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.
And here is complete exception details:
Autofac.Core.Registration.ComponentNotRegisteredException
HResult=0x80131500 Message=The requested service 'Nop.Plugin.Payments.CheckMoneyOrder.CheckMoneyOrderPaymentProcessor' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency. Source=Autofac StackTrace: at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters) at Autofac.Extensions.DependencyInjection.AutofacServiceProvider.GetRequiredService(Type serviceType) at Nop.Core.Infrastructure.NopEngine.Resolve(Type type) in V:\nopCommerce_4.00_Source\Libraries\Nop.Core\Infrastructure\NopEngine.cs:line 254