Welcome to MSDN Blogs Sign in | Join | Help

Getting my Sandcastle Team Build targets file to work with Sandcastle September CTP

A few things before we get started:

  1. You will need the HTML Help Workshop installed
  2. September CTP of Sandcastle
  3. 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)

  1. Make a copy of %programfiles%\Sandcastle\Presentation\vs2005\configuration\sandcastle.config
  2. Change references of
    1. ..\..\ to %programfiles%\sandcastle\
    2. ..\cpref_reflection to %programfiles%\sandcastle\examples\cpref_reflection

Update your TFSBuild.proj to include the following:

  1. Add a new Import tag referencing the sandcastle targets file
  2. 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>
  3. Add an additional target that overrides the AfterCompile target
    <Target Name="AfterCompile">
    <CallTarget RunEachTargetSeparately="true" Targets="DocumentCLR" ContinueOnError="false"/>
    <OnError ExecuteTargets=" OnBuildBreak;"/>
    </Target>
  4. 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
Published Tuesday, October 31, 2006 10:45 AM by Richard Murillo
Attachment(s): Sandcastle.targets

Comments

# re: Getting my Sandcastle Team Build targets file to work with Sandcastle September CTP

Thursday, January 04, 2007 11:14 PM by JoeGeeky

This is great, I have been looking for something like this, although when I follow the instruction I get an error.  Is there a work around?

Target AfterCompile:

   Target DocumentCLR:

       Target SandcastleDocument:

           mrefbuilder.exe C:\ISource\MDAS\TeamBuilds\Smelser.NET\Hello World Team Build\BuildType\..\Sources\..\Binaries\x86\Debug\*.dll /out:C:\DOCUME~1\SVCSTF~1\LOCALS~1\Temp\Smelser.NET_Hello World Team Build\reflection.org /dep:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\*.dll,C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.QualityTools.UnitTestFramework\8.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll

           MrefBuilder (v2.2.61208.1447)

           Copyright c Microsoft 2006

           Error: An error occured while loading assemblies for reflection. The error message is: Could not find a part of the path 'C:\Program Files\Sandcastle\ProductionTools\Build\Binaries\x86\Debug'.

           C:\Program Files\MSBuild\Sandcastle.targets.xml(30,5): error MSB3073: The command "mrefbuilder.exe C:\ISource\MDAS\TeamBuilds\Smelser.NET\Hello World Team Build\BuildType\..\Sources\..\Binaries\x86\Debug\*.dll /out:C:\DOCUME~1\SVCSTF~1\LOCALS~1\Temp\Smelser.NET_Hello World Team Build\reflection.org /dep:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\*.dll,C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.QualityTools.UnitTestFramework\8.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll" exited with code 1.

# re: Getting my Sandcastle Team Build targets file to work with Sandcastle September CTP

Sunday, January 07, 2007 2:26 PM by JoeGeeky

I recently left another comment on this post related to a "part of a path" cannot be found, although for some reason it is not showing up. With that said, it appears to be related to two things that were ommitted from the article...  (1) The procedures assume TFSbuild places the source files in a folder named '$(BinariesRoot)\x86\Debug' folder, and (2) the TFS Build Name cannot have any spaces in it...  After getting past these items thing went well and this is very promising.

As an aside, the instructions related to "Change references..." do not appear to be valid on the newest release...

New Comments to this post are disabled
 
Page view tracker