What is the error "The method or operation is not implemented." in nopCommerce plugin during installing a new plugin
Asked Answered
S

2

7

I am working on nopCommerce CMS. I created my own plugin and want to install it via Admin panel. I successfully created the plugin and it is showing in admin panel under Local Plugin section. When I am trying to install it, I am getting error "The method or operation is not implemented.". Can any one tell me what am I missing.

Please find the code below that I write to install :

private readonly ISettingService _settingService;

    public AdminInvoicePlugin(ISettingService settingService)
    {
        this._settingService = settingService;
    }

    public void GetConfigurationRoute(out string actionName, out string controllerName, out System.Web.Routing.RouteValueDictionary routeValues)
    {
        actionName = "Configure";
        controllerName = "InvoiceAdmin";
        routeValues = new RouteValueDictionary { { "Namespaces",     "Shopfast.Plugin.Invoice.Admin.Controllers" }, { "area", null } };
    }

   void IPlugin.Install()
    {
        base.Install();
    }

    PluginDescriptor IPlugin.PluginDescriptor
    {
        get
        {
            throw new NotImplementedException();
        }
        set
        {
            throw new NotImplementedException();
        }
    }

    void IPlugin.Uninstall()
    {
        base.Uninstall();
    }
Stoppage answered 5/2, 2015 at 7:45 Comment(1)
Doh! Implement the PluginDescriptor property.Coney
F
1

Please bare in mind that NopCommerce plugin code is not always refreshed immediately after deploying if the server process was still running at the time. It often requires an application restart (backend, top right corner) and/or "Reload list of plugins" action from Configuration->Plugins page.

After you remove the throw NotImplementedException part, it's quite likely that you still encounter the error message because the code isn't updated in memory.

Figueroa answered 21/2, 2015 at 22:50 Comment(0)
W
0

I changed the following code:

PluginDescriptor IPlugin.PluginDescriptor
    {
        get
        {
            throw new NotImplementedException();
        }
        set
        {
            throw new NotImplementedException();
        }
    }

to this code:

PluginDescriptor IPlugin.PluginDescriptor
    {
        get;
        set;
    }

and the problem is solved. I am not getting the error now.

Winchell answered 19/10, 2015 at 11:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.