I created the documentation project with the Visual Studio plug-in after installing Sandcastle.
I added the following post-build event on another project when completed successfully:
IF "$(ConfigurationName)"=="Debug" Goto Exit
ECHO Building SHFB help file via MSBuild
"$(SystemRoot)\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" /p:CleanIntermediates=True /p:Configuration=Release "$(SolutionDir)Documentation\Documentation.shfbproj"
:Exit
The SHFB environment variable in the project documentation file looks like this:
<!-- NOTE: Update the version number in the path (YYYY.M.D.R) to match the package version -->
<SHFBROOT Condition=" '$(SHFBROOT)' == '' ">$(MSBuildThisFileDirectory)..\packages\EWSoftware.SHFB.2016.9.17.0\tools\</SHFBROOT>
If Sandcastle isn't installed on the system, it'll use the executables from the NuGet package. Make sure the version matches for others.
These documentation links might help for issues I forgot about: