Run a subset of actions

Hi, we have a rather big "base" FB project that contains a big number of MSBuild actions.

We also have a number of FB Projects that includes the base project for building the required components.

We would like these FB Projects to be able to send some sort configuration to the base FB Project to specify what components to build.

My first thought was to pass a comma separated variable to the base project containing the name of all required MSBuild actions, and then use the BeforeAction script to skip all actions not in this list.

For this to work the BeforeAction script must know about the name of the MSBuild project file, but I can't find any way to access the current action variables from the BeforeAction script, how do I do this?

Maybe there is a better solution to the entire problem?

//Chrille

Hi

This sounds like a good way of achieving this.

To access the value of the MSBuild project file property from the BeforeAction script event you can use Action.BuildFile.

This property will contain the value entered in the project file text box, if you are using variable references in your file paths then you will need to expand these before checking this value. You can do this using the Action.ExpandExpression() method.

Example (JavaScript):
var projectFile = Action.ExpandExpression(Action.BuildFile);

Hope this helps.

Regards,
Steve