FinalBuilder comes with a built-in MSBuild task, allowing FinalBuilder projects to be execution as part of an MSBuild Project.
If you want to use FinalBuilder as part of a Team Foundation Build Project, see the topic on FinalBuilder's graphical Team Build Integration features.
To include a FinalBuilder project inside an MSBuild project, you will need to include exactly one UsingTask element for the FinalBuildertask (see below for the full syntax), and then one or more FBCmd tasks to execute FinalBuilder projects.
Here is a minimal example which can be copy-and-pasted into an MSBuild Project file. The FinalBuilder project will run for the "AfterBuild" target.
<UsingTask TaskName="FinalBuilder.FBCmd" AssemblyName="FinalBuilder.MSBuild.Tasks, Version=8.0.0.0, Culture=neutral, PublicKeyToken=300e5b79bda2b697" />
<Target Name="AfterBuild">
<FBCmd ProjectFile="C:\My Build\My Build.fbp8" />
</Target>
Here is an example task showing all available options:
<FBCmd ProjectFile=".\Included Project.fbp8"
Variables="VariableA='Hello World';VariableB=66"
StopIfFBFails="true"
AllowInteractive="true"
DontWriteToLog="false"
Timeout="30000"
ShowBanner="true"
FBVersion="7"
/>
Path to the FinalBuilder project to execute. Required.
Optional. Specify one or more variables to set in the target project. Use the syntax "Name=Value". Separate multiple variables with semicolons. Optional.
Should the MSBuild Target fail if FB fails? Defaults to True.
Should interactive actions be allowed in the project? Defaults to False.
Should output be not written to the FinalBuilder log? Defaults to False.
Should the action time out after X milliseconds? Defaults to no timeout.
Should the FinalBuilder banner be sent to the MSBuild log?
What version of FinalBuilder should be used to execute the project? By default, this is determined by the project file name.
There are some other, undocumented, options which are used when working with Team Foundation Server. It is recommended that you use the FinalBuilder Visual Studio Addin to configure these options.