SandCastle Help Builder in MSBuild Process

Topics: Developer Forum
Dec 2, 2009 at 7:38 AM


I've just tried the SandCastle Help File Builder and it looks great.

I would like to generate the same output automatically from my MSBUILD script.

It is not clear to me what I need to do this, SandCastle Help File Builder, SandCastle project ...etc?

Do you have an example?




Dec 2, 2009 at 3:15 PM
Edited Dec 2, 2009 at 3:16 PM

Assuming you are using SHFB, the project file format is an MSBuild project so you can use MSBuild to build it.  If you're merging it into another MSBuild project, you can use the MSBuild task to build it.  You'll need Sandcastle and the help file builder installed.  The DXROOT environment variable should point to the Sandcastle installation folder and the SHFBROOT environment variable should point to the SHFB installation folder.  There's information on building from the command line in this topic:  Adding a task to an MSBuild project might look similar to this:

  <!-- Build source code docs -->
  <MSBuild Projects="$(SolutionRoot)\src\MyProjectHelp.shfbproj"
      Properties="Configuration=Release;Platform=AnyCPU;OutDir=$(OutDir)" />