Sandcastle Target File (using March CTP)
I've been working on building MSDN style documents for my assemblies and wanted to automate this into my build script. If you follow the example that comes with the Sandcastle download, it has a .bat file that executes commands for all transformations and executables. I preferred a target file that I could add in a few properties and have the script build the files.
There was one major hang up, apparently the name of the produced documents is tied to the 'test' name. I went so far as to modify one of the transformations (reflectionToChmProject.xsl) to look at the assembly name in the reflection.xml file and rename the files based on that. But, it blew up at the last step of creating a chm file because it was still looking for 'test'. So, I designed the target file so that if down the road the Sandcastle team release a version that supports naming the documents, then you can change that property.
To install, I created a folder in C:\Program Files\MSBuild\Microsoft\ called Sandcastle and dropped my target file in there. Then I created a project file and imported the target and added the "CreateDocumentation" to the default targets. Change your <CurrentDirectory> value to where the code lives (folder that contains .csproj) and then specify the assembly to build documentation for in the <Assembly> property.
Feel free to open up the .target file and modify or change what is supported - I created it as more of a template. I'll eventually have the main project file change the current directory and specify multiple assemblies to build. Then it can be useful for multiple assemblies when you build solutions.
Also, this is not supported by the Sandcastle team, just something I created to build documentation with.
Required Tools: HTML Help 2.0 SDK and HTML Help Workshop.
Download here: SandcatleTarget (contains test.proj and Microsoft.Sandcastle.targets)
Use of included code sample is subject to the terms specified at http://www.microsoft.com/info/cpyright.htm