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

Anand Dubey picture Anand Dubey · Feb 5, 2015 · Viewed 22.1k times · Source

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();
    }

Answer

Dan Mirescu picture Dan Mirescu · Feb 21, 2015

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.