为什么我看不到我的海洋插件
我一直试图弄清楚为什么我的模块没有加载,但我没有看到任何明显的错误消息。 这是一个非常基本的设置(还没有什么花哨的) 这是我的模块定义:
public class MyModule : IModule
{
public void Disintegrate()
{
}
public void Initialize()
{
CoreLogger.Info("Starting my module ");
}
public void Integrate()
{
// Register MyModuleProcess
MyModuleProcess mymoduleprocessInstance = new MyModuleProcess();
PetrelSystem.ProcessDiagram.Add(mymoduleprocessInstance , "Plug-ins");
}
public void IntegratePresentation()
{
}
public void Dispose()
{
}
}
我的过程也非常简单:
class MyModuleProcess: Process
{
/// <summary>
/// Constructor.
/// </summary>
public MyModuleProcess() : base("MyModuleProcess")
{
}
#region Process overrides
/// <summary>
/// Creates the UI of the process.
/// </summary>
/// <returns>the UI contol</returns>
protected override System.Windows.Forms.Control CreateUICore()
{
return new MyModuleProcessUI(this);
}
/// <summary>
/// Runs when the process is activated in Petrel.
/// </summary>
protected override sealed void OnActivateCore()
{
base.OnActivateCore();
}
/// <summary>
/// Runs when the process is deactivated in Petrel.
/// </summary>
protected override sealed void OnDeactivateCore()
{
base.OnDeactivateCore();
}
#endregion
}
我的配置文件条目是:
<add moduleType="MyModulePlugin.MyModule, MyModulePlugin,Version=1.0.0.0,Culture=neutral, PublicKeyToken=xxxxxxxxxxx"/>
Petrel 加载正常,我没有收到任何错误消息,但我在插件文件夹下看不到我的过程,任何想法?
谢谢
I am stuck trying to figure why my module is not loading but I don't see any obvious error message.
It is a very basic setup (nothing fancy yet)
Here is my module definition :
public class MyModule : IModule
{
public void Disintegrate()
{
}
public void Initialize()
{
CoreLogger.Info("Starting my module ");
}
public void Integrate()
{
// Register MyModuleProcess
MyModuleProcess mymoduleprocessInstance = new MyModuleProcess();
PetrelSystem.ProcessDiagram.Add(mymoduleprocessInstance , "Plug-ins");
}
public void IntegratePresentation()
{
}
public void Dispose()
{
}
}
And my process is also very simple :
class MyModuleProcess: Process
{
/// <summary>
/// Constructor.
/// </summary>
public MyModuleProcess() : base("MyModuleProcess")
{
}
#region Process overrides
/// <summary>
/// Creates the UI of the process.
/// </summary>
/// <returns>the UI contol</returns>
protected override System.Windows.Forms.Control CreateUICore()
{
return new MyModuleProcessUI(this);
}
/// <summary>
/// Runs when the process is activated in Petrel.
/// </summary>
protected override sealed void OnActivateCore()
{
base.OnActivateCore();
}
/// <summary>
/// Runs when the process is deactivated in Petrel.
/// </summary>
protected override sealed void OnDeactivateCore()
{
base.OnDeactivateCore();
}
#endregion
}
and my config file entry is :
<add moduleType="MyModulePlugin.MyModule, MyModulePlugin,Version=1.0.0.0,Culture=neutral, PublicKeyToken=xxxxxxxxxxx"/>
Petrel loads ok, I don't get any error message, but I don't see my process under the plug-ins folder, any ideas?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我的解决方案可能会对已签署程序集的人有所帮助。我既无法在 Petrel 中看到我的插件,也无法调试我的 VS 项目。
经过过去两天的大量绞尽脑汁后,我通过执行以下简单步骤解决了同样的问题:
My solution might help people who have signed the assembly. I was neither able to see my plug-in in Petrel nor able to debug my VS project.
After lot of head scratching for the past two days, I was able to resolve the same issue by doing the following simple steps: