using Sandcastle Help File Builder as part of a TFS build

Topics: Developer Forum
Feb 6, 2007 at 4:56 PM
I'm trying to integrate a SHFB project into a Team Foundation server build.
I have tried the following:
  • Add a solution into the build with a post build step to run SandcastleBuilderConsole.exe with my required project.
  • Create a custom Build Target - inheriting the Microsoft.Build.Utilities.ToolTask class. Command line arguments point to the console and the required project.
  • Create another custom Build Target - this time inheriting the Microsoft.Build.Utilities.Task class. The execute method creates a process to run the console with my required project.

In all cases I am confident that the console app is successfully running and successfully locating the project, however on each occasion I get an error that the SandcastleBuilderConsole.exe is exiting with Code 2.

The log shows the following:
Clearing working folder...
Finding tools...

BUILD FAILED: Object reference not set to an instance of an object.

The project definitely works in isolation and the Team Build user has administrative permissions on the server.

Any ideas for a solution VERY gratefully received. Thanks.
Feb 6, 2007 at 7:09 PM
There's a bug in the current version where if it can't find the DXROOT environment variable, it will fail. You can work around the problem by specifying the path to Sandcastle in the project's SandcastlePath property. You can also download the Special build found under the Planned Releases option on the Releases page. It fixes that issue and adds some new features to the console mode builder.

Feb 7, 2007 at 8:54 AM
Thanks Eric. problem solved by specifying the path to Sandcastle in the config.
I'm very happy now!