This project has moved. For the latest updates, please go here.

Using Sandcastle inside VS2010

Topics: Developer Forum
Nov 8, 2010 at 12:41 PM


I need to use Sandcastle to automatically generate CHM file during build process inside VS2010. I mean on using Post-build event.

I've read the article about using Sandcastle inside VS2010 at this address:

But it's not clear for me.

Take a look at the instructions in Post-build edit field:

ECHO Building SHFB help file via MSBuild
    /p:CleanIntermediates=True /p:Configuration=Release

I don't understand last line:


Should I create SandcastleBuilder.shfbproj file before I use it inside VS2010? If so, I don't need that way. When I run the build process, GUI builder opens. I need the way of creation CHM file without opening GUI builder at all. How can I do that?

Thank you in advance.



Nov 8, 2010 at 1:53 PM

I'm doing this:

1) Open Sandcastle Help File Builder.

2) Create new project and name it GetOracleData.shfbproj.

3) Add project's XML file to "Documentation Sources" along with project's DLL.

4) Save the project and close Sandcastle Help File Builder.

5) Open VS2010 and open my project there.

6) Write this instruction in Post-build field:

"$(SystemRoot)\Microsoft.NET\Framework\v3.5\MSBuild.exe" /p:CleanIntermediates=True /p:Configuration=Debug "$(SolutionDir)Doc\GetOracleData.shfbproj"

7) Save my project in VS2010.

8) Build the project.

It works fine.


I'd like to not open Sandcastle Help File Builder and add XML and DLL files manually. Is this possible?


Nov 9, 2010 at 3:48 PM

Currently, SHFB does not support VS2010 project files as documentation sources since it's still built against MSBuild 3.5.  For the time being you do need to add the assemblies and comments files manually as documentation sources.