[英]What is the error “The method or operation is not implemented.” in nopCommerce plugin during installing a new plugin
I am working on nopCommerce CMS. 我正在研究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();
}
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. 请记住,如果服务器进程当时仍在运行,则在部署后不会立即刷新NopCommerce插件代码。 It often requires an application restart (backend, top right corner) and/or "Reload list of plugins" action from Configuration->Plugins page.
它通常需要从Configuration-> Plugins页面重新启动应用程序(后端,右上角)和/或“重新加载插件列表”操作。
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. 删除
throw NotImplementedException
部分后,您很可能仍然遇到错误消息,因为代码未在内存中更新。
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.
我现在没有收到错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.