Search code examples
oceanpetrel

Why can't I see my ocean plugin


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


Solution

    1. Are you sure you modified the correct petrel.exe.config
    2. Did you add your folder to the probing path? You would get an error however if this was true, but an idea.