我正在尝试创建一个新的插件,但该插件没有显示在G1ANT工作室的插件菜单中。甚至从市场上安装的其他插件也不会显示。我使用的是最新版本。我已经尝试以管理员身份运行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作为依赖项。
发布于 2019-11-12 20:26:31
我知道问题出在哪里了。G1ANT.Language.dll与插件位于同一目录中,这似乎是导致问题的原因。
发布于 2019-11-12 19:47:49
您的代码中没有错误。您是否编译过本教程中的HelloWorld示例?https://github.com/G1ANT-Robot/G1ANT.Addon.Tutorials/tree/master/G1ANT.Addon.Command.HelloWorld
记住1.解决方案中的所有.NET都应标记为“资源”,并将嵌入到您的外接程序中2.项目的目标All框架应为4.6.1
https://stackoverflow.com/questions/58744003
复制相似问题