自定义插件未显示在 G1ANT studio 的插件菜单中
Custom addon not displayed in the addons menu in G1ANT studio
我正在尝试创建一个新插件,但该插件未显示在 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 作为依赖项。
您的代码没有错误。您是否编译过本教程中的 HelloWorld 示例? https://github.com/G1ANT-Robot/G1ANT.Addon.Tutorials/tree/master/G1ANT.Addon.Command.HelloWorld
记得
1. 解决方案中的所有 dll 都应标记为 "Resource" 并将嵌入到您的插件中
2. 你项目的目标.NET Framework应该是4.6.1
我明白问题出在哪里了。 G1ANT.Language.dll 与插件位于同一目录中,它似乎是导致问题的原因。
我正在尝试创建一个新插件,但该插件未显示在 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 作为依赖项。
您的代码没有错误。您是否编译过本教程中的 HelloWorld 示例? https://github.com/G1ANT-Robot/G1ANT.Addon.Tutorials/tree/master/G1ANT.Addon.Command.HelloWorld
记得 1. 解决方案中的所有 dll 都应标记为 "Resource" 并将嵌入到您的插件中 2. 你项目的目标.NET Framework应该是4.6.1
我明白问题出在哪里了。 G1ANT.Language.dll 与插件位于同一目录中,它似乎是导致问题的原因。