【问题标题】:Custom addon not displayed in the addons menu in G1ANT studioG1ANT studio 的插件菜单中未显示自定义插件
【发布时间】:2020-03-03 18:07:03
【问题描述】:

我正在尝试创建一个新插件,但该插件没有显示在 G1ANT Studio 的插件菜单中。甚至从市场安装的其他插件也不会显示。我正在使用最新版本。我曾尝试以管理员身份运行 G1ANT studio。然而这并没有什么区别。

这是我的插件的 Addon.cs 文件:

using System.Collections.Generic;
using System.Linq;
using System.Text;
using G1ANT.Language;

// Please remember to refresh G1ANT.Language.dll in references

namespace G1ANT.Addon.LibreOffice
{
    [Addon(Name = "libreoffice", Tooltip = "Provides commands to automate LibreOffice")]
    [Copyright(Author = "G1ANT LTD", Copyright = "G1ANT LTD", Email = "support@g1ant.com", Website = "www.g1ant.com")]
    [License(Type = "LGPL", ResourceName = "License.txt")]
    [CommandGroup(Name = "calc", Tooltip = "Commands connected with creating editing and generally working on calc")]
    public class LibreOfficeAddon : Language.Addon
    {

        public override void Check()
        {
            base.Check();
            // Check integrity of your Addon
            // Throw exception if this Addon needs something that doesn't exists
        }

        public override void LoadDlls()
        {
            base.LoadDlls();
            // All dlls embeded in resources will be loaded automatically,
            // but you can load here some additional dlls:

            // Assembly.Load("...")
        }

        public override void Initialize()
        {
            base.Initialize();
            // Insert some code here to initialize Addon's objects
        }

        public override void Dispose()
        {
            base.Dispose();
            // Insert some code here which will dispose all unnecessary objects when this Addon will be unloaded
        }
    }
}

插件还引用了一些其他 DLL 作为依赖项。

【问题讨论】:

    标签: c# automation robotics rpa g1ant


    【解决方案1】:

    您的代码中没有错误。您是否曾经编译过本教程中的 HelloWorld 示例? https://github.com/G1ANT-Robot/G1ANT.Addon.Tutorials/tree/master/G1ANT.Addon.Command.HelloWorld

    记住 1.解决方案中的所有dll都应标记为“资源”,并将嵌入到您的插件中 2.你项目的目标.NET Framework应该是4.6.1

    【讨论】:

    • 我发现了问题所在。 G1ANT.Language.dll 与插件位于同一目录中,这似乎是导致问题的原因。
    【解决方案2】:

    我发现了问题所在。 G1ANT.Language.dll 与插件位于同一目录中,这似乎是导致问题的原因。

    【讨论】:

    • 插件应该在哪个目录下?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-08
    • 2014-08-21
    • 1970-01-01
    • 2016-11-13
    相关资源
    最近更新 更多