Sandcastle Help Compiler 2 support 3

Update

After installing the August CPT of Sandcastle, you’ll need to update to the latest version of the MSBuild script.

I’ve just released a new version of the MSBuild-script for Sandcastle. There are two new features and one new (though optional) requirement.

First of all, the new requirement is the Visual Studio .NET Help Integration Kit 2003 which contains Microsoft Help Compiler 2.

The two new features of the script are:

  • Can now compile both CHM (Html Help 1.x) and HxS (Microsoft Help 2) files
  • Supports custom content files (things like header, footer and copyright text)

You can download the following files:

  • Sandcastle.zip
    Unzip the contents of this file to c:\Program Files\MSBuild\Sandcastle.
  • SandcastleTest.zip
    This file contains a sample solution and a sample MSBuild script (called Documentation.proj).

Instructions are more or less the same as before:

  1. If you haven’t already done so, install the Sandcastle June CTP. The scripts rely on a completly unmodified installation, so don’t make any changes to it (especially not the sandcastle.config file).
  2. Unzip the contents of Sandcastle.zip to your MSBuild folder (usually c:\Program Files\MSBuild)
  3. Unzip the contents of SandcastleTest.zip to wherever you like to keep your sample projects.
  4. Open up the SandcastleTest.sln solution file and build the project.
  5. Open a Visual Studio 2005 Command prompt, navigate to the SandcastleTest folder and run the one of the following commands:
    • MSBuild Documentation.proj
      To build a CHM file.
    • MSBuild Documentation.proj /t:DocumentationNew
      To build an HxS file.
    • MSBuild Documentation.proj /t:DocumentationAll
      To build both a CHM and an HxS file
  6. Cross your fingers, and when the process is finished, look for the Output\SandcastleTest.chm and/or the Output\SandcastleTest.HxS files!
  7. In order to actually view an HxS-file you’ll need to register it with MSHelp. Or, an easier way (just to see that it works) is to use the free H2Viewer-utility.

3 thoughts on “Sandcastle Help Compiler 2 support

  1. Anonymous Aug 17,2006 12:53

    Great script! If you want the appropriate name to appear in CHM title add Title=$(HelpName) at HHPFileContents section in Sandcastle.Files.includes.

    /Anders G

  2. Anonymous Aug 23,2006 10:17

    Works great!

    Does anybody know how to register the HxS file using the h2reg (www.helpware.net/mshelp2/h2reg.htm) utility?

    NDoc generated a INI file for that. Is this maybe an option for your MSBuild task?

  3. Anonymous Sep 24,2006 08:38

    Wonderful. But I have these concerns. Can somebody post on how to achieve this. I’m kind of lost here.
    * Display the correct help title.( I do not see HHFileContents section in Sandcastle.files.includes)

    * Display The search tab with search enabled.

    Any help would be appreciated

Comments are closed.