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

Upgrading SHFB

Sep 16, 2014 at 4:10 PM
Edited Sep 16, 2014 at 4:12 PM
I am in a production cluster and have Sandcastle, SHFB and HTML Workshop. I am upgrading SHFB to the latest version(May 30, 2014) to make use of the VS2013 presentation style and was wondering if I had to upgrade Sandcastle and HTML Help Workshop as well? Also, I wanted to confirm that VS2013 installation is not needed (I have VS2012), is this correct?

I ask this because I am using MSBUILD to compile my SHFB project file (that uses old Sandcastle, old HTML Workshop but latest SHFB) and get an error mentioned here:

My old sandcastle installation does not have
%ProgramFiles%\Sandcastle\ProductionTools\Frameworks.xml file,

Sep 16, 2014 at 4:23 PM
The old Sandcastle tools installed in %ProgramFiles(x86)%\Sandcastle are obsolete as is the old DXROOT environment variable. You can uninstall them. The Sandcastle tools are now installed as part of SHFB and are found in the SHFBROOT folder once you install the latest release. HTML Help Workshop is separate and there is no newer version.

Note that you may need to remove, re-add, and configure build components and plug-ins in the project as there have been a number of breaking changes and their configurations need to be updated. Open the project in the standalone GUI or Visual Studio and let it upgrade the project if necessary and then refresh the build component and plug-in configurations.

VS2013 is not required and doesn't have to be on the build server, that's just the name of the presentation style. The VSPackage used with Visual Studio will currently install in any release from VS2010 to VS2013. .NET 4.0 or later is required and must be on the build server since all the tools are compiled for use with .NET 4.0 or later.

Sep 16, 2014 at 4:43 PM
Edited Sep 16, 2014 at 5:01 PM
Thank you for your reply.

I am still getting the error though. Our setup is such that SC, SHFB and HTML Help WS are all installed on a network drive but we use our own machine's msbuild.exe (so all tools with .NET 4.0 are installed locally). We have written a makefile that invokes msbuild.exe on the .shfbproj file and there we get the above error. It seems like I may be missing some setting of environment variables. I have SHFBROOT pointing to root help file builder folder. Would you have any suggestions on this?


PS: If I install all 3 of them locally and use the SHFB GUI to build the project (the project file gets updated),everything works fine. But I need to automate this using a makefile and that all 3 of them will be on a network drive.
Sep 16, 2014 at 9:13 PM
I made some progress.

I can invoke msbuild.exe on the shfbproj file successfully. But when I set the SHFBROOT variable and invoke the exact same command from a makefile, I receive the error. This is pretty strange. Perhaps I need to see if any preprocessing is happening in my cluster just before the makefile is being read.
Sep 16, 2014 at 10:16 PM
Also make sure SHFBROOT is a system environment variable and not a user variable. It should be if you used the installer.

Sep 17, 2014 at 3:34 PM
Edited Sep 17, 2014 at 3:47 PM
Thanks again Eric. SHFBROOT is a system variable. It does seem like an issue at my end rather than with SC. The build starts fine but breaks in between:

Build started 9/17/2014 10:23:33 AM.
Project "<path to shfbproj file>" on node 1 (default targets).
Building <path to shfbproj file>

[Sandcastle Help File Builder, version 2014.5.31.0]
Creating output and working folders...
Finding tools...
The Sandcastle tools are located in 'value of %SHFBROOT%'
Found HTML Help 1 compiler in '<path to HTML Workshop>'
Last step completed in 00:00:00.0330

SHFB : error BE0071: Unable to locate information for the project framework version '.NET Framework 4.0' or a suitable redirected version on this system.

In the above, I see the missing:

Locating components in the following folder(s):

<full path of folder containing shfbproj file>
Using presentation style 'VS2013' located in 'value of %SHFBROOT%\PresentationStyles\VS2013'
Loading and initializing plug-ins...
Lightweight Website Style Version 2014.5.31.0
Copyright c 2006-2014, Eric Woodruff, All Rights Reserved
Portions Copyright c 2014, Sam Harwell, All Rights Reserved

Why would it not print even the "Locating components...." where my shfbproj file is, I don't know. So I am not sure what/where to look at besides SHFBROOT which has the correct value. If you have any information I would appreciate it, but again, it is a problem at my end rather than with the Sandcastle.
Sep 17, 2014 at 4:00 PM
It's failing early before it gets to loading the plug-ins so that's why you aren't seeing those messages. Based on the error, I have to think that you don't have the reference assembly folders on that system (%ProgramFiles(x86)%\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0 for example). It's possible those are only installed by Visual Studio though I thought they were installed as part of the .NET Framework. The workaround would be to edit the Frameworks.xml file and change the path to point to the physical framework assembly location rather than the reference assemblies (%SystemRoot%\Microsoft.NET\Framework\v4.0.30319). The problem there is that it may not contain the XML comments files for the base framework so you won't get comments on the list pages for the base members. I suppose you could copy the reference assembly folders to the build machine as another workaround.

Sep 17, 2014 at 4:30 PM
Edited Sep 17, 2014 at 4:30 PM
this worked, thanks a lot! I recollect this as the workaround from the discussion link in my very first post here, but didn't completely understand it. Your explanation helped me and I can now finally automate the entire build process. Thank you!