This project has moved and is read-only. For the latest updates, please go here.

Can I avoid building the docs on every build?

Topics: Developer Forum
Apr 7, 2012 at 6:19 PM

I've just updated to v1.9.3.4 Beta 2 using the Guided Installer.  I already had the current version of Sandcastle and, I think, the Styles.  It detected Sandcastle and the already-installed HTML Help 1 builder but didn't detect the Styles - not sure if it should've or even if it could, given the nature of the Styles (but you asked for feedback so...).  Everything about the installation was smooth and I appreciate your efforts: thank you.  I have three machines I use regularly so anything that simplifies keeping them up to date is very welcome.

I'm loving the Visual Studio integration, except for one thing.  I regularly rebuild my solutions and the slowest part, now, is the documentation.  Even hitting F5 to Debug causes the docs to be rebuilt.  Is there any way to modify things such that documentation projects are only built on a Build > Rebuild Solution or something similar?  I know I can do it using Configuration Manager but I have enough configurations as it is, so I'd prefer to avoid that.

Apr 7, 2012 at 7:36 PM

You don't have to add any new configurations.  All you need to do is uncheck the Build column on the documentation project in the affected debug configurations in the Configuration Manager.  That's how I set my projects up so that it only builds documentation on release builds.



Apr 8, 2012 at 10:54 AM

That would, indeed, be the easiest solution.  Thank you.

Apr 10, 2012 at 11:08 AM

That makes sense, but would it not also make sense to have the doc build scripts use MSBuild Inputs and Outputs to ensure it only builds if the files are out of date?

Apr 10, 2012 at 4:16 PM

It's not like a normal build where you're compiling source code.  There's a lot that goes into it and you'd have to keep the intermediate files around in the working folder which take up a lot of space.  In short, there's no easy way to check to see what's out of date or perform incremental builds based on what changed.