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

Problems locating build tools on 64-bit PC

Topics: User Forum
Jun 16, 2009 at 4:25 AM

I've been using SHFB v1.8.0.2 for some months now without problems; however, recently we upgraded our PCs from 32-bit W2K3 to 64-bit Vista SP1. On the new PCs, the documentation automated build fails with the following error:

<?xml version="1.0" encoding="utf-8"?>
<shfbBuild product="Sandcastle Help File Builder Utilities" version="" projectFile="D:\Source\Contracts\Development\Src\Contracts.shfbproj" started="16/06/2009 1:17:37 PM">
<buildStep step="Initializing">
<buildStep step="FindingTools">

Finding tools...

    Last step completed in 00:00:00.0020

<buildStep step="Failed">

SHFB: Error BE0035: Could not find the path to the Microsoft Sandcastle documentation compiler tools.  See error topic in help file for details.


HTML 1.x and 2.0 are both installed; I can run hhc, hxcomp and mrefbuilder from the commandline. When I open up the .shfbproj with the GUI tools, the build works fine, it's only when building from the command line that it fails.

Any idea what's going on?!


Jun 16, 2009 at 4:23 PM

I don't have anything to offer yet as a solution.  I've got a couple of other 64-bit OS issues to look into.  I've got to set up a virtual machine for testing when I get some time so it may be a little while yet.



Jun 17, 2009 at 5:57 PM

I bet sandcastle is located under Program Files (x86) (or whatever it's called on an ENU system...) - can't you just set the path to sandcastle manually in the shfb project?


Generally, development under 64bit can be a bit more complicated that under x86, since quite a number of important tools (especially from the Windows SDK) cannot be found automatically - at least, that's my impression ;)

Jun 18, 2009 at 11:47 PM

@jmoeller You meen edit the .shfbproj file and set the paths to use C:\Program Files (x86)? I've already made that change and it didn't fix things. The problem is also that we've got a mix now of 32-bit and 64-bit machines, so we would have to add extra logic in there anyway to switch between the various locations it could be installed at. For the time being, I don't mind not building documentation on my PC (which is 64-bit) so long as the 32-bit build server can do the job.

Jun 23, 2009 at 9:18 AM

Hmm, we are still using SHFB 1.7 here - I have to admit that it's been a long time that I tried it on our regular build machine (the 64bit one) - since it is completely impossible to run the help2 compiler from an ssh session, we also build the documentation separately and resuse it (building takes a loooong time, anyway). Can try it, though... Actually, we don't use a locally installed sandcastle at all - it is bundled with our deployment stuff and unpacked in place, so at least for 1.7 on a 32bit machine, changing the path does work.

Aug 6, 2009 at 9:57 PM

I was able to resolve the initial errors SHFB 1.8 reported on my 64-bit Server 2008 by forcing it to run in 32-bit mode with the help of the following command.

corflags SandcastleBuilderGUI.exe /32BIT+ /Force
Aug 8, 2009 at 10:09 PM

Just to follow up on this thread, it would appear that the GUI uses the 64-bit version of the MSBuild assemblies.  My assumption is that this happens because SHFB is built using the AnyCPU platform rather than explicitly for the x86 32-bit platform.  If you compile the help project from the command line using the 32-bit MSBuild.exe, it will run the SHFB assemblies as 32-bit assemblies or at least appears to do so.  Using the 32-bit MSBuild.exe also resolves issues with the built-in variables such as MSBuildExtensionsPath resolving to the right location.  Regardless of platform, it should find the Sandcastle tools since it will use the DXROOT environment variable, the PATH environment variable, and as a last resort will search the \Program Files or \Program Files (x86) folder (if it exists).