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

Unexplained error in Sandcastle build

Topics: Developer Forum
Apr 25, 2013 at 9:58 AM
We've moved our TFS build from an old build agent to a new machine. The msbuild target that builds the project documentation is now failing with a BE0043 error. The LastBuild.log file has the following lines:

MrefBuilder (v2.4.10520.1)
Copyright © Microsoft 2006
Info: Loaded 33 assemblies for reflection and 67 dependency assemblies.
MREFBUILDER : error : Unresolved assembly reference: Autoscribe.Utility (Autoscribe.Utility, Version=1.2.4728.21605, Culture=neutral, PublicKeyToken=null) required by Web Grid
Last step completed in 00:00:01.3311
Given that the build compiles cleanly and runs all the tests successfully, can anyone suggest what might be causing this unresolved assembly reference error? I can build the help file on my own machine with no trouble, using the same shfbproj file. Autoscribe.Utility is an assembly that is part of the solution, and Web Grid is too.

Platform: Windows 7 Pro 64bit, TFS 2008 toolchain, Sandcastle & Helpfile builder versions from 2008.

Apr 25, 2013 at 4:02 PM
Edited Apr 25, 2013 at 4:04 PM
Is it possible the assembly is in the GAC and you've got an older or newer version on the server? The build log should list the assemblies it found and will pass in as reference assemblies. If it is a versioning issue, you can use the Assembly Binding Redirection plug-in to point the older version at the newer one or vice versa.

EDIT: From the version of MRefBuilder, you're using a pretty old version of Sandcastle and SHFB. I'd suggest updating to the latest release as there have been a number of bug fixes and improvements since that release.

Apr 26, 2013 at 8:52 AM
Is it safe to upgrade to the latest version on the build agent? We are not using .Net 4 for example in our development environment - everything is based on VS2008 and .Net 3.5.

To answer your other question, the unresolved reference (Autoscribe.Utility.dll) exists only in the build folders on that server. The build server on which this is occurring is brand new and I built it myself so I would know if it has been installed in the GAC (not something we would normally do), and it hasn't been.

Apr 26, 2013 at 8:34 PM
If you're running SHFB or earlier, I don't recall whether it reports the references found in the build log. Versions and later allow the use of Visual Studio solutions and projects as documentation sources and it will resolve reference assemblies in the projects automatically with few if any exceptions so it's typically not required to specify them manually. For the older versions of SHFB, you may have to add the assembly reference to the SHFB project manually so that it can find it.

.NET 4.0 is required to run the latest release of SHFB and the Sandcastle tools but it will still document any assembly from .NET 1.0 to 4.5. The different framework versions can coexist side by side so there are no issues in that regard. SHFB projects from v1.8.0.0 onward are standard MSBuild project files so they also integrate better with various build environments. If you later update to VS 2010 or VS 2012, there's a package to provide full Visual Studio integration as well. The standalone GUI is still supplied and supported too.

I've also taken over support and development of the Sandcastle tools themselves since Microsoft has discontinued support for them. If you'd like to see what's changed and been fixed since the version you're currently using, see the SHFB Version History and Sandcastle Tools Version History.