Help with Building Documentation with TFS

Feb 13, 2008 at 3:25 PM
We are having trouble getting SHFB to build documentation using a TFS build. The VS2008 Solution build works great but the problem we have with TFS is that the build path and the file locations are different. TFS places all of the assemblies into a "Binaries" folder on the Build the build server and the folder structure is built based on the type of build being run, i.e. "Integration\Binaries\Mixed Platforms\Integration" We followed the SHFB documentation for building the docs with TFS and that got us started. Now we are passing arguments to SHFB to override what is in SHFB's project file. We grab the correct paths through variables in the TFS build file and pass the correct paths to SHFB. Where we are running into problems when passing multiple dependencies for assemblies with the -dependency= flag. It seems the only option is a single assembly or to put a wildcard character in the path. The problem with the wildcard is that the assemblies we want to document are in the directory along with the dependencies. What is the best way to do this? Is it possible to pass multiple dependencies on the command line? Would it better to create a response file and pass that to SHFB? Any help would be great thanks.

Bill
Coordinator
Feb 13, 2008 at 5:49 PM
I don't use TFS so I can't comment on how to use it. However, you can specify multiple -dependency command line options. Each will be added individually.

Eric
Feb 14, 2008 at 9:50 PM
Hi Eric,

We did get SHFB running in TFS. Adding multiple -dependency options was a huge help. So what we are doing is using a single SHFB project file for both TFS and for building within a solution in VS2008. To accomplish this we have to use the TFS Community tasks to edit the SHFB project file and remove the dependency and assembly reference elements. We noticed this because it continued to fail and the build log would give us a path error for a path from the SHFB project file. It looks like SHFB somewhere still makes a reference back to the project file for a path to assemblies or dependencies even with overriding the path through the command line.

To build the paths to put on the command line, we have ItemGroups in our <PackageBinaries> target for the assemblies we want to document and the assemblies that are dependencies. We then use a transform to build the argument list from the item groups for passing to SHFB in the exec command. We were going to build a response file on the fly but using the command line with exec is much easier. Also, with using the TFS Environment variables, it shouldn't matter if we moved our build service to another box.

Thanks for your help,
Bill