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?
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.
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:
The params look like this:
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:
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:
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With