As Scott Wiley pointed out, you need to specify this on the post build event command line in the Visual Studio project properties. However, I would suggest using Sandboxle Help File Builder (SHFB) rather than Sandcastle directly. This makes the command line call short and simple, as shown below, but note that you first need to configure the SHFB project using the SHFB GUI, which creates the msbuild-compatible assembly file with the suffix ".shfbproj":
C: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ MSBuild.exe
/ p: Configuration = Release myProject.shfbproj
However, please note that I take the opposite approach from what you are doing: instead of using Visual Studio to interactively launch the assembly and supporting actions, I use ant (nant) to start the assembly of everything, including my Visual Studio Solutions and subsequent SHFB actions. So this is really a command line call that I am making to create documentation using Sandcastle:
<exec executable="${msbuild}" dir="${csharpdoc}" output="${csharpdoc.log}"> <arg value="/p:Configuration=Release"/> <arg value="myProject.shfbproj"/> </exec>
My preference is that the entire assembly should be launched from the command line so that interactions are not required (for example, starting Visual Studio, etc.). This provides the flexibility to run either as a scheduled recurring task or on demand from the shell.
Michael sorens
source share