Getting my Sandcastle Team Build targets file to work with Sandcastle September CTP
A few things before we get started:
- You will need the HTML Help Workshop installed
- September CTP of Sandcastle
- My September CTP Sandcastle Targets File (attached)
This file needs to be copied to your %programfiles%\MSBuild directory
Next you will need to make some modifications to the standard configuration file (I am using the VS2005 style)
- Make a copy of %programfiles%\Sandcastle\Presentation\vs2005\configuration\sandcastle.config
-
Change references of
- ..\..\ to %programfiles%\sandcastle\
- ..\cpref_reflection to %programfiles%\sandcastle\examples\cpref_reflection
Update your TFSBuild.proj to include the following:
- Add a new Import tag referencing the sandcastle targets file
-
Add a new target called DocumentCLR
<Target Name="DocumentCLR">
<CallTarget Targets="SandcastleDocument" ContinueOnError="false" />
<MakeDir Condition="!Exists('$(BinariesRoot)\Documentation')" Directories="$(BinariesRoot)\Documentation" ContinueOnError="false" />
<Copy SourceFiles="$(SandcastleWorkingDirectory)\Output\$(SandcastleDocumentationName).chm" DestinationFiles="$(BinariesRoot)\Documentation\$(SandcastleDocumentationName).chm" ContinueOnError="false"/>
</Target>
- Add an additional target that overrides the AfterCompile target
<Target Name="AfterCompile">
<CallTarget RunEachTargetSeparately="true" Targets="DocumentCLR" ContinueOnError="false"/>
<OnError ExecuteTargets=" OnBuildBreak;"/>
</Target>
- Update your TFSBuild.rsp file to include some configuration
/p:SandcastleDocumentationName=NameOfYourCHM
/p:SandcastleConfiguration="C:\Path_TO_MODIFIED_CONFIG\sandcastle.config"
/p:SandcastleDocumentationOutput=$(BinariesRoot)\Documentation
/p:SandcastleDependencies="%windir%\Microsoft.NET\Framework\v2.0.50727\*.dll,\\lcabuildvm01\3rdParty\Dependencies\*.dll,%windir%\assembly\GAC_MSIL\Microsoft.VisualStudio.QualityTools.UnitTestFramework\8.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll"
/p:SandcastleHelpGeneration=CHM