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

Project file build configurations

Topics: User Forum
Mar 7, 2011 at 5:27 PM


I've recently started using SHFB and it's a great tool. One thought I'm having is whether I can use a concept similar to build configurations to build my project.

What I want to achieve specifically is to build the shfbproj file through msbuild, but control whether only conceptual content is build through a command-line switch. Currently this is done through a plugin, which modifies the shfbproj file directly. Since its format is a format of an msbuild file, how can I use msbuild properties for the same purpose? If I can use a custom msbuild property, I can supply the value from the command line. 

Essentially I want to have two build scripts - one that builds conceptual topics only and one that builds my full project, documentation sources included. How can I achieve this without modifying the .shfbproj file and without using the UI?


Mar 7, 2011 at 8:40 PM

The plug-in does more than just change the configuration in the project file.  It shuts off a number of the build steps at build time to prevent the ones that generate API content from running.  You can use a target override file with the "/p:CustomBeforeSHFBTargets=pathToOverideFile" MSBuild command line option.  It allows you to specify project property overrides in an external file and supports plug-in configurations, etc.  You'd cut and paste the PlugInConfigurations property from the main project and put it in the override file including the configuration for the Additional Content Only plug-in.  If you had any other plug-in configurations, you'd need to include them as well since it completely replaces the property rather than merging it.  See the Building Projects Outside the GUI topic for more information.