Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4026546
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:59:01+00:00 2026-05-20T10:59:01+00:00

What steps do I need to take to get HTML documentation automatically building via

  • 0

What steps do I need to take to get HTML documentation automatically building via the build step in Visual Studio? I have all the comments in place and the comments.xml file being generated, and Sandcastle installed. I just need to know what to add to the post-build step in order to generate the docs.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T10:59:02+00:00Added an answer on May 20, 2026 at 10:59 am

    Some changes have been made since this question was asked. Sandcastle no longer includes SandcastleBuilderConsole.exe. Instead it uses plain old MSBuild.exe.

    To integrate this with visual studio here is what I did:

    Place this in your Post-build event:

    IF "$(ConfigurationName)"=="Release" Goto Exit
    
    "$(SystemRoot)\microsoft.net\framework64\v4.0.30319\msbuild.exe" /p:CleanIntermediates=True /p:Configuration=Release "$(SolutionDir)ProjectName\doc\DocumentationProjectName.shfbproj"
    
    :Exit
    

    This will cause visual studio to build your documentation, only when you build in “Release” mode. That way you aren’t waiting forever when you build in “Debug” mode during development.

    A couple notes:

    • My system is 64-bit, if yours is not then replace framework64 with framework in the path to msbuild.exe.

    • The way I have it setup is to document each project in my solution individually. If you have a “Sandcastle Help File Builder” project file which includes several projects together, then you probably want to get rid of ProjectName\ and move doc into the solution directory. In this case you will want to only put the Post-build event commands on the project that is built LAST in your solution. If you put it in the Post-build event for every project then you will be rebuilding your documentation for each project that is built. Needless to say, you’ll be sitting there a while. Personally I prefer to document each project individually, but that’s just me.

    Installing Sandcastle and “Sandcastle Help File Builder”.

    If you don’t know how to get Sandcastle and “Sandcastle Help File Builder” setup correctly, then follow these steps:

    1. Download and install Sandcastle from http://sandcastle.codeplex.com/ (if you have a 64 bit system, you will need to add an environment variable. The instructions are here.

    2. Download and install “Sandcastle Help File Builder” from http://shfb.codeplex.com/ (ignore warnings about MSHelp2 if you get any. You won’t be needing it.)

    3. Once you have those installed then use “Sandcastle Help File Builder” to create a new documentation project. When it asks you where to save the file, save it in the documentation folder you have in your solution/project.
      http://www.chevtek.com/Temp/NewProject.jpg

    4. After creating a new project you’ll need to choose which kind of documentation you want to create. A compiled windows help file, a website, or both.
      http://www.chevtek.com/Temp/DocumentationType.jpg

    5. If you saved the SHFB project file in the directory where you want your documentation to be generated then you can skip this step. But if you want the generated documentation to be placed elsewhere then you need to adjust the output path.
      http://www.chevtek.com/Temp/OutputPath.jpg
      NOTE: One thing to keep in mind about the output path (which frustrated me for an hour) is that when you have website checked as the type of documentation you want, it will overwrite content in its output path. What they neglect to tell you is that SHFB purposely restricted certain folders from being included as part of the output path. Desktop is one such folder. Your output path cannot be on the desktop, not even a sub-folder of desktop. It can’t by My Documents either, but it CAN be a subfolder of my documents. If you get errors when building your documentation, try changing the output path and see if that fixes it. See http://shfb.codeplex.com/discussions/226668?ProjectName=shfb for details on this.

    6. Finally, you will need to add a reference to the project you want to document. If you are doing individual projects like I do, then for each SHFB project file you create, you will reference the corresponding .CSPROJ file. If you have one SHFB project for your entire solution, then you would find the .SLN file for your solution. (sandcastle also works if you reference the compiled DLLs, but since you’re integrating it with Visual Studio I find it makes more sense to reference the project/solution files instead. This may also mean that it really doesn’t matter which project you do the post-build event on since it’s referencing the code instead of the DLLs, but it’s better to be safe and put it on the last project that’s built)
      http://www.chevtek.com/Temp/AddSource.jpg

    7. Save the project and you can close “Sandcastle Help File Builder”. Now all is setup. Just be sure to put the documentation project file in the appropriate folder that the batch commands point to in the Post-build event.

    I hope my short tutorial helps you out! It was very hard for me to find any decent tutorials showing me how to use sandcastle, let alone how to integrate it with visual studio. Hopefully future google searches will turn up this question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

At work we use WiX for building installation packages. We want that installation of
I followed the tutorial at http://www.magentocommerce.com/wiki/5_-_modules_and_development/0_-_module_development_in_magento/installing_custom_attributes_with_your_module step by step to make my module install
So thanks to many of the replies from this board, I have a much
how can i make this.... goto this link and see the text sliding after
So I'm running out of time on this project and I posted here in
I'm new to BDD, and using SpecFlow I'm trying to work out an efficient,
Unfortunately this is going to be a pretty open-ended question, but I am at
I'm trying to think of how to validate that a web service is only
I would like to know more about the extent it is possible to control
I'm using Reportlab to create PDFs. I'm creating two PDFs which I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.