Install Plugin Error

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 years ago
Hi,

I have Plugin. and in PaymentTrackingService.cs. I have error when I install plugin.

"The requested service 'Nop.Plugin.Payments.Services.PaymentTrackingService' 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."

public class DependencyRegistrar : IDependencyRegistrar

{

private const string CONTEXT_NAME = "nop_object_context_name";

public int Order

{

get

{

return 0;

}

}

public void Register(ContainerBuilder builder, ITypeFinder typeFinder, NopConfig config)

{

builder.RegisterType<PaymentTrackingService>()

.As<IPaymentTrackingService>()

.InstancePerLifetimeScope();

this.RegisterPluginDataContext<SanalPosObjectContext>(builder, CONTEXT_NAME);

builder.RegisterType<EfRepository<PaymentTracking>>()

.As<IRepository<PaymentTracking>>()

.WithParameter(ResolvedParameter.ForNamed<IDbContext>(CONTEXT_NAME))

.InstancePerLifetimeScope();

}

}
3 years ago
Are you stepping though this routine in the debugger ?
When do you see the above error ?

My routine is a little different in one line
instead of
    this.RegisterPluginDataContext<SanalPosObjectContext>(builder, CONTEXT_NAME);
i have
    builder.RegisterPluginDataContext<NameContextObject>("nop_object_context_group_name");
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.