BE0029: Unexpected error while executing plug-in 'Version Builder'

Topics: Developer Forum
May 16, 2011 at 9:40 AM

First some background information.... I've got a Visual Studio (2010) solution with several projects, some are Silverlight 4.0 projects and the rest are normal .NET 4 projects. I was trying to generate a help file (only HTML Help 1) for this solution and found out that it's not possible to generate help for a "mixed projects" solution. So I ended up creating two seperate Sandcastle projects (one for the SL projects: Documentation.SL.shfbproj, the other with the rest: Documentation.shfbproj).
I'm using the Version Builder plug-in to combine them into one help file. This setup works perfectly when I'm generating the help file using the SHFB GUI, it builds one giant help file as I expected.

But as soon as I use the automated TFS build server to do a nightly build of the solution and the help file, it crashes. The following error shows up in the log file (I've replaced the long filepaths with dots):

SHFB : error BE0029: Unexpected error while executing plug-in 'Version Builder': SandcastleBuilder.Utils.BuilderException: Unable to build prior version project: E:\.........\Documentation.SL.shfbproj [E:\........\Documentation.shfbproj]

If I take a look at the more detailed SHFB log, the last few lines look like this (I've replaced the long filepaths with dots):

<plugIn name="Version Builder" behavior="After" priority="1000">

Performing partial builds on prior version projects

Building E:\........\Documentation.SL.shfbproj
Initializing
FindingTools
ValidatingDocumentationSources
Failed
</plugIn>
    Last step completed in 00:00:00.5311
</buildStep>
<buildStep step="Failed">

SHFB: Error BE0029: Unexpected error while executing plug-in &#39;Version Builder&#39;: SandcastleBuilder.Utils.BuilderException: Unable to build prior version project: E:\........\Documentation.SL.shfbproj
   at SandcastleBuilder.PlugIns.VersionBuilderPlugIn.Execute(ExecutionContext context)
   at SandcastleBuilder.Utils.BuildEngine.BuildProcess.ExecutePlugIns(ExecutionBehaviors behavior)
Unable to build prior version project: E:\........\Documentation.SL.shfbproj

</buildStep>
</shfbBuild>

Note that both SHFB projects are version 1.9.3.0
I've also installed the June Sandcastle Styles (2.6.10621.1 - Rev 1)<!-- $(function() { $('#BeTheFirstToReviewAnchor').click(function() { ShowRatingsLightBox(); return false; }); }); // -->.

Can someone tell me what I'm overlooking here...?

Coordinator
May 16, 2011 at 8:25 PM

Take a look at the log file of the failing project to find out what error it is causing.  You'll find it in a sub-folder with an auto-generated name under the main project's working path after the failed build.  It's failing in the ValidatingDocumentationSources step so it's most likely not finding an assembly.  The log will indicate which one.

Eric

 

May 17, 2011 at 8:18 AM

Hi Eric,

Thanks for the fast reply!
When I was looking for the log file of the SHFB project that I added using the Version Builder, it wasn't located where I expected it to be.
In both SHFB project files, the BuildLogFile property is set to: $(OutDir)\$(HtmlHelpName)_SHFB.log however, only the log file of the 'normal' (non Silverlight) project is located in that particular output folder where the assemblies are also located. I found the other (.SL) log file in the root of the E: drive. It looks as if the MSBuild outdir parameter is not passed on correctly to the Version Builder which builds the second help file.
The incorrect outdir might also explain why the log file contains the following error:

<buildStep step="Failed">

SHFB: Error BE0040: Project assembly does not exist: E:\BuildCache\1\Development\Daily Build\Sources\Product Source\Controls.SL\..\..\Binaries\Debug\Controls.SL.dll

</buildStep>

This isn't the correct folder, it should go up 3 folders (..\..\..\Binaries\Debug\Controls.SL.dll).
This is the first assembly in the ValidatingDocumentationSources list, I guess execution stops when an error occurs so it won't even go and look for the other assemblies.

Is it possible for you to check if the $OutDir parameter is passed correctly when using MSBuild??

Thanks,
Wouter.

Coordinator
May 18, 2011 at 8:27 PM

Currently, $(OutDir) isn't passed to the sub-projects that get built by the version builder plug-in.  I'll see about supporting it.

Eric

 

Coordinator
May 18, 2011 at 8:29 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
May 18, 2011 at 8:47 PM

Okay, thanks!

I'll just wait until it's fixed then :)