What is the error "Method or operation not implemented." in the nopCommerce plugin during the installation of a new plugin

I am working on CMS nopCommerce. I created my own plugin and want to install it through the admin panel. I have successfully created a plugin and it is displayed in the admin panel under the "Local plugin" section. When I try to install it, I get the error "Method or operation not implemented." Can someone tell me what I am missing.

Please find the code below that I am writing 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(); } 
+6
source share
2 answers

Please note that the NopCommerce plugin code is not always updated immediately after deployment if the server process is still running at that time. Often, you need to restart the application (backend, upper right corner) and / or "Reload the list of plugins" on the page "Configuration-> Plugins".

After deleting the throw NotImplementedException part of throw NotImplementedException it is likely that you are still encountering an error message because the code is not updating in memory.

+1
source

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 resolved. I am not getting an error now.

0
source

Source: https://habr.com/ru/post/982020/


All Articles