<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/automatically-generate-sandcastle-documentation-using-cruisecontrol-net-or-vsts-team-build-nqcvoz5eb" -->

---
title: Automatically generate SandCastle documentation using...
description: A step-by-step guide shows how to automate SandCastle API documentation generation on a build server using either CruiseControl.NET or VSTS Team Build. It...
canonical: https://daily.dev/posts/automatically-generate-sandcastle-documentation-using-cruisecontrol-net-or-vsts-team-build-nqcvoz5eb
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Automatically generate SandCastle documentation using CruiseControl.NET or VSTS Team Build | daily.dev
og:description: A step-by-step guide shows how to automate SandCastle API documentation generation on a build server using either CruiseControl.NET or VSTS Team Build. It...
og:url: https://daily.dev/posts/automatically-generate-sandcastle-documentation-using-cruisecontrol-net-or-vsts-team-build-nqcvoz5eb
og:image: https://api.daily.dev/og/posts/NQcvOz5EB.png
og:image:alt: Automatically generate SandCastle documentation using CruiseControl.NET or VSTS Team Build
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Automatically generate SandCastle documentation using CruiseControl.NET or VSTS Team Build

**[Maarten Balliauw](https://daily.dev/sources/maartenballiauw)** · 4 min read · 0 upvotes · 0 comments

## Summary

A step-by-step guide shows how to automate SandCastle API documentation generation on a build server using either CruiseControl.NET or VSTS Team Build. It covers installing the SandCastle Help File Builder (SHFB), fixing a known bug in the 1.5.0.1 release's MRefBuilder.config file, enabling XML documentation output in project settings, creating an SHFB configuration file, and wiring the SHFB command-line tool into a scheduled build task that copies generated docs to a web server folder.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.maartenballiauw.be/posts/2007-08-28-automatically-generate-sandcastle-documentation-using-cruisecontrol-net-or-vsts-team-build>

## Questions this post answers

### How do I fix the MRefBuilder.config bug in SandCastle Help File Builder 1.5.0.1?

Open C:\Program Files\EWSoftware\Sandcastle Help File Builder\Templates\MRefBuilder.config in Notepad and replace %DXROOT% with {@SandcastlePath} on line 4. This resolves a known bug in SHFB version 1.5.0.1 that otherwise breaks the documentation build process when running SandcastleBuilderConsole.exe.

_Developers wiring SandCastle into a build pipeline can find setup fixes like this through daily.dev._

### How do I automatically generate SandCastle documentation on a CruiseControl.NET build server?

Add a new project to ccnet.config with a scheduled trigger and two exec tasks: one calling SandcastleBuilderConsole.exe with the path to a .shfb configuration file, and another using xcopy to deploy the generated files to a web server folder like wwwroot. Setting a generous buildTimeoutSeconds value matters since documentation builds can take over an hour.

_Teams scheduling automated doc builds track CruiseControl.NET configuration tips on daily.dev._

### How do I add a documentation build step to a VSTS Team Build TFSbuild.proj file?

Add an AfterCompile target containing two Exec tasks: the first runs SandcastleBuilderConsole.exe against the .shfb configuration file to generate documentation, and the second uses xcopy to copy the generated output into a web server directory such as wwwroot. Check in the build file afterward so the solution build triggers it.

_Developers integrating documentation generation into Team Build pipelines follow guides like this on daily.dev._

## Similar posts on daily.dev

- [MSBuild explained: Understanding Microsoft’s build platform](https://daily.dev/posts/msbuild-explained-understanding-microsoft-s-build-platform-eurl48soa) · InfoWorld · 1 upvotes · 0 comments
- [Automating Flutter Android Deployments: CI/CD, Play Store & Shorebird OTA](https://daily.dev/posts/automating-flutter-android-deployments-ci-cd-play-store-shorebird-ota-tidg0wtgb) · Medium · 0 upvotes · 0 comments
- [foojay – Documentation as Code with AsciiDoctor, GitLab CI, and GitLab Pages](https://daily.dev/posts/foojay-documentation-as-code-with-asciidoctor-gitlab-ci-and-gitlab-pages-2fslmmcqk) · Foojay.io · 3 upvotes · 0 comments
- [Simple Project Documentation with MkDocs, PlantUML, and PlantUML-C4 Integration](https://daily.dev/posts/simple-project-documentation-with-mkdocs-plantuml-and-plantuml-c4-integration-ysgvf2igo) · Jacek Galowicz · 0 upvotes · 0 comments

---

Tags: [#cicd](https://daily.dev/tags/cicd)

[View this post on daily.dev](https://daily.dev/posts/automatically-generate-sandcastle-documentation-using-cruisecontrol-net-or-vsts-team-build-nqcvoz5eb)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Automatically generate SandCastle documentation using CruiseControl.NET or VSTS Team Build","url":"https://daily.dev/posts/automatically-generate-sandcastle-documentation-using-cruisecontrol-net-or-vsts-team-build-nqcvoz5eb","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/automatically-generate-sandcastle-documentation-using-cruisecontrol-net-or-vsts-team-build-nqcvoz5eb"},"datePublished":"2026-10-04T13:06:13.474Z","dateModified":"2026-10-04T13:14:41.362Z","description":"A step-by-step guide shows how to automate SandCastle API documentation generation on a build server using either CruiseControl.NET or VSTS Team Build. It...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/2ea11a8d945cc5b9480e2829590ffe73?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/2ea11a8d945cc5b9480e2829590ffe73?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Maarten Balliauw","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Maarten Balliauw","logo":"https://media.daily.dev/image/upload/s--rOTg3VYO--/f_auto,q_auto/v1791119043/logos/maartenballiauw?_a=BAMAMicg0","url":"https://daily.dev/sources/maartenballiauw"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/automatically-generate-sandcastle-documentation-using-cruisecontrol-net-or-vsts-team-build-nqcvoz5eb","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"cicd","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Maarten Balliauw","item":"https://daily.dev/sources/maartenballiauw"},{"@type":"ListItem","position":3,"name":"Automatically generate SandCastle documentation using CruiseControl.NET or VSTS Team Build"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/automatically-generate-sandcastle-documentation-using-cruisecontrol-net-or-vsts-team-build-nqcvoz5eb#faq","mainEntity":[{"@type":"Question","name":"How do I fix the MRefBuilder.config bug in SandCastle Help File Builder 1.5.0.1?","acceptedAnswer":{"@type":"Answer","text":"Open C:\\Program Files\\EWSoftware\\Sandcastle Help File Builder\\Templates\\MRefBuilder.config in Notepad and replace %DXROOT% with {@SandcastlePath} on line 4. This resolves a known bug in SHFB version 1.5.0.1 that otherwise breaks the documentation build process when running SandcastleBuilderConsole.exe. Developers wiring SandCastle into a build pipeline can find setup fixes like this through daily.dev."}},{"@type":"Question","name":"How do I automatically generate SandCastle documentation on a CruiseControl.NET build server?","acceptedAnswer":{"@type":"Answer","text":"Add a new project to ccnet.config with a scheduled trigger and two exec tasks: one calling SandcastleBuilderConsole.exe with the path to a .shfb configuration file, and another using xcopy to deploy the generated files to a web server folder like wwwroot. Setting a generous buildTimeoutSeconds value matters since documentation builds can take over an hour. Teams scheduling automated doc builds track CruiseControl.NET configuration tips on daily.dev."}},{"@type":"Question","name":"How do I add a documentation build step to a VSTS Team Build TFSbuild.proj file?","acceptedAnswer":{"@type":"Answer","text":"Add an AfterCompile target containing two Exec tasks: the first runs SandcastleBuilderConsole.exe against the .shfb configuration file to generate documentation, and the second uses xcopy to copy the generated output into a web server directory such as wwwroot. Check in the build file afterward so the solution build triggers it. Developers integrating documentation generation into Team Build pipelines follow guides like this on daily.dev."}}]}
```

