简体   繁体   English

在安装新插件期间nopCommerce插件中的错误“方法或操作未实现。”

[英]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.

相关问题 错误:未实现方法或操作。 而脚手架MYSQL数据库 - Error: The method or operation is not implemented. while scaffolding MYSQL Database 安装插件时出现 NopCommerce 4.10 错误 - NopCommerce 4.10 error while installing plugin 该方法或操作未实现。 在C#中停止IIS网站时 - The method or operation is not implemented. while stopping IIS website in C# 实体框架核心,UD sql function 抛出 System.NotImplementedException:“方法或操作未实现。” - Entity Framework Core, UD sql function throws System.NotImplementedException: 'The method or operation is not implemented.' 错误:未执行操作非方法 - Error: The operation not method is not implemented 未实施该方法或操作。 Microsoft.EntityFrameworkCore.DbSet`1.System.Linq.IQueryable.get_Provider() - The method or operation is not implemented. Microsoft.EntityFrameworkCore.DbSet`1.System.Linq.IQueryable.get_Provider() NotImplementedException:方法或操作未实现。 在 C# 中调用 GC.TryStartNoGCRegion() 时 - NotImplementedException: The method or operation is not implemented. when calling GC.TryStartNoGCRegion() in C# NopCommerce 4.20 插件开发错误与依赖注入 - NopCommerce 4.20 Plugin development error with Dependency Injection NopCommerce 3.1中的DataAccess插件 - DataAccess Plugin in NopCommerce 3.1 如何在nopcommerce中更新插件? - How to update plugin in nopcommerce?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM