Output Deleted When New Build Starts

Aug 1, 2007 at 5:28 PM
I notice that even when you have set the "CleanIntermediates" property to False the output is getting cleared. Is this SandCastle clearing this, or is SHFB doing this?

This is really an issue for me because I want to be able to build multiple project files to the same output folder, because I then make that output folder and online help using an internal system we have. Currently I can't do this because each build deletes the previously built projects output. If this is SHFB that is controlling this, it would be nice to have a property that can be set to never delete the output before it builds.
Coordinator
Aug 1, 2007 at 8:36 PM
CleanIntermediates only applies to the .\Working folder where the build takes place. With regard to output, if building a help file (CHM or HXS), the file is deleted. I do this at the start of the build as there were several people that requested it as they kept leaving the help file open and it would prevent the new one from compiling on a subsequent build which was a pain after a lenthy build. If it can't be deleted up front it lets you know immediately.

If building a website, the entire output folder is purged first before the new content is copied. The main intent here is that you can switch styles or naming methods and you won't get a lot of obsolete stuff accumulating in the output folder. The problem with outputing several website builds to one folder is that the common files would overwrite each other. The table of content is the most obvious example as are identically named namespaces/types if using friendly names. Using GUID names isn't really safe either as it isn't really a GUID but an MD5 hash of the ID so again common names across assemblies may produce a common filename that gets overwritten. Chances are that it is common code compiled into each but if different, your docs could be wrong. Running something after the builds to merge the file sets would probably be a better approach so that you could check for and take action to handle any such conflicts that arise and also merge the tables of content.

Eric
Aug 2, 2007 at 5:29 PM
Yeah that's a good point. I'll just do an xcopy in between my MSBuild tasks to copy the output to the folder I want before building the next project. Thx