Unexpected plugin execution behavior

Topics: Developer Forum
Nov 13, 2007 at 3:48 PM
Hello Eric,

I encountered with weird plugin execution behavior. I register my ResolveReferencePlugIn as following:
public ExecutionPointCollection ExecutionPoints
{
   get
  {
      if (_executionPoints == null)
      {
          _executionPoints = new ExecutionPointCollection();
         _executionPoints.Add(new ExecutionPoint(BuildStep.CreateConfig, ExecutionBehaviors.After));
      }
      return _executionPoints;
   }
}

Plugins itself modifies the contents of ResolveReferenceLinks2 component.

I found that Execute() method is called twice! (second call comes immediately after first execution - I tested it with a progress message).

Coordinator
Nov 13, 2007 at 4:54 PM
I tried it out with your plug-in (downloaded the code and rebuilt). I couldn't duplicate the problem but I have made changes in the plug-in area and have moved the CreateConfig step down later in the process so that plug-ins have a chance to modify other stuff that ends up in the config file. It's possible the changes corrected the problem indirectly. I should have the new release out late tomorrow.

Eric
Nov 14, 2007 at 6:26 AM


EWoodruff wrote:
I tried it out with your plug-in (downloaded the code and rebuilt). I couldn't duplicate the problem but I have made changes in the plug-in area and have moved the CreateConfig step down later in the process so that plug-ins have a chance to modify other stuff that ends up in the config file. It's possible the changes corrected the problem indirectly. I should have the new release out late tomorrow.

Eric



Eric I'm very sorry, i distributed plugin with my small test workaround, where I remember if plugin was executed (and I did not describe it in this forum).

If You downloaded source, just comment statement:
if (_executed)
{
   context.Executed = false;
   return;
}

in Execute() method of ResolveReferencePlugin and test it...

Once again I'm sorry

MaD
Coordinator
Nov 24, 2007 at 12:08 AM
I tried this today with the 1.6.0.2 version with the code modified to throw an exception if it ran twice and it didn't so I think it did get fixed by other changes.

Eric