2

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
  • 1,735
  • 2
  • 22
  • 36
MBen
  • 3,956
  • 21
  • 25
  • Do you see the log message you post with CoreLogger.Info("Starting my module ") in the log file? – Hallgrim Jul 28 '11 at 20:53
  • No, can't see anything in the log files. I am using 2012 does that have any changes? – MBen Jul 30 '11 at 17:56
  • I think I will just restart from scratch, can't see any obvious problem. – MBen Aug 01 '11 at 11:25
  • Was your module able to be loaded when it was put in the "default" group? Could you please post your PetrelTrust group setting of your petrel.exe.config? – Sheng Xue Sep 06 '11 at 10:03

2 Answers2

2
  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.
  • Yes. Well I put it directly under Extension folder, and tried under different folder, but no luck. – MBen Jul 28 '11 at 19:41
  • Is the add moduleType .... under the area? – Grant Marblestone Jul 28 '11 at 19:54
  • Yes I did put there, but then I have access to the Ocean developer key, so I put under the PetrelTrust, the problem is that I see no error whatsoever, still can't see my plugin – MBen Jul 30 '11 at 17:47
0

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:

  1. Go to your Visual Studio project properties.
  2. Go to the "Signing" tab.
  3. Uncheck "Delay sign only" option if it is checked.
  4. Now run your project and it should work. I worked for me.
nhahtdh
  • 55,989
  • 15
  • 126
  • 162
Shelly A G
  • 11
  • 1