Question

I've googled a lot to try to find a solution but it seems like I'm missing something.

Most articles tells me that I should modify the build file (TfsBuild.proj). But I cant find that file anywhere. Googling around a bit more tells me that it has been replaced by a new build model in TFS2010?

And the official documentation for SHFB just says:

Modify your build file. This example uses a daily build to generate documentation:

It fails to mention what file and how.

Can someone be kind and shed some light in how I can configure our TFS Build Server to also generate documentation using Sandcastle Helpfile Builder?

Was it helpful?

Solution

The easiest way to do it is to just include the SHFB project file in the build configuration. The SHFB project files works just as any project file in Visual Studio.

OTHER TIPS

You are correct. Team Build 2010 is based on Workflow Foundation and to accomplish this you will need to create a custom build process template.

Even though the core project has been deprecated you may find what you are looking for here: http://tfs2010extendedbuild.codeplex.com/

Information on how to customize your build process template can be found here: http://rabcg.codeplex.com/

If your into books, this is fantastic: http://www.amazon.com/Inside-Microsoft-Build-Engine-Foundation/dp/0735645248/ref=ntt_at_ep_dpt_1

At first, I hope you 're talking about TFS2010, or else this answer is out of scope.

We have customized our build process template with an additional call to MSBuild in this sequence:

enter image description here

The params look like this:

enter image description here

In order for all to function, we have added another Argument named SandcastleProject, in which we provide in our Build Defitinition the Source Control path to the .shfbproj file ($/.../.shfbproj).

Just before this sequence breaks out, we convert this path to local using activity ConvertWorkspaceItem, that fills a Variable named localSandcastleProject with the local entry:

enter image description here

I have recently wrote a blog post about it: http://www.22bugs.co/post/sandcastle-help-file-builder-tfs-build/. Here are the steps required:

1. Download and install SHFB on your build server

Get the latest release from [https://github.com/EWSoftware/SHFB][shfb] and install it on your build server. A reboot might be required after the installation has completed.

2. Define drop location (optional)

Edit your **.shfbproj* file by adding the following:

<!-- Put this code under inside <Project><PropertyGroup>...</PropertyGroup></Project> -->
<OutDir Condition=" '$(OutDir)' == ''">.</OutDir>
<OutputPath>$(OutDir)\Help</OutputPath>

This will instruct TFS to copy the SHFB's output to the build's drop folder.

3. Define deploy location (optional)

If after each successful build you'd like to auto-deploy the output to yet another location (other than the drop folder), you can define the following post-build task:

if NOT "$(DeployDocsTo)" == "" (
  powershell "\"$(DeployDocsTo)\" -split \";\" | foreach { Copy-Item \"$(OutputPath)\" \"$_\" -Force -Recurse }"
)

Now you can define MSBuild argument $(DeployDocsTo) to instruct TFS where to deploy your docs. For example set it to

/p:DeployDocsTo="\\app-server\c$\docs"

Good luck.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top