Error BE0065: BUILD FAILED: Root element is missing.

Topics: Developer Forum, User Forum
Jun 16, 2010 at 2:13 AM
Edited Jun 16, 2010 at 2:21 AM

I just started getting this BE0065 error yesterday on some of my projects.  The Build Output is below.

-------------------------------
[Sandcastle Help File Builder Utilities, version 1.8.0.3]
Creating output and working folders...
Loading and initializing plug-ins...
Hierarchical Table of Contents Version 1.8.0.3
Copyright © 2007-2010, Eric Woodruff, All Rights Reserved
-------------------------------
Clearing working folder...
-------------------------------
Finding tools...
Found Sandcastle tools in 'C:\Program Files\Sandcastle\'
-------------------------------
Validating and copying documentation source information
Source: C:\thesource\z.1\svc\iisroot\Bin\Design1ClientLib.dll
    Found assembly 'C:\thesource\z.1\svc\iisroot\Bin\Design1ClientLib.dll'
Source: C:\thesource\z.1\svc\iisroot\Bin\Design1ClientLib.xml

References to use:
    ZClientLib1
    ZServiceExtLib1

Copying XML comments files
    C:\thesource\z.1\svc\iisroot\Bin\Design1ClientLib.xml -> c:\thesource\z.1\svc\iisroot\docs\Design1\Working\Design1ClientLib.xml
-------------------------------
Generating shared content files (en-US, English (United States))...
    Last step completed in 00:00:00.0937
-------------------------------
Generating API filter for MRefBuilder...
    Last step completed in 00:00:00.0156
-------------------------------
Generating reflection information...
[c:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe]
GenerateRefInfo:
  MrefBuilder (v2.4.10520.1)
  Copyright c Microsoft 2006
  Info: Loaded 1 assemblies for reflection and 0 dependency assemblies.
  XslTransform (v2.4.10520.1)
  Copyright c Microsoft 2005-2006
  Info: Applying XSL transformation 'C:\Program Files\Sandcastle\ProductionTransforms\MergeDuplicates.xsl'.
Error : The input file 'reflection.all' is not well-formed. The error is: Root element is missing.
    Last step completed in 00:00:16.2801
-------------------------------

SHFB: Error BE0065: BUILD FAILED: Root element is missing.

I get a debugger prompt after the line in red above.  The debugger just says it is MrefBuilder getting a NullReferenceException.
System.NullReferenceException was unhandled
  Message=Object reference not set to an instance of an object.
  Source=MrefBuilder
  StackTrace:
       at Microsoft.Ddue.Tools.Reflection.NamespaceFilter.IsExposedNamespace(Namespace space)
       at Microsoft.Ddue.Tools.Reflection.NamespaceFilter.IsExposedType(TypeNode type)
       at Microsoft.Ddue.Tools.Reflection.RootFilter.HasExposedMembers(TypeNode type)
       at Microsoft.Ddue.Tools.Reflection.ApiFilter.HasExposedMembers(TypeNode type)
       at Microsoft.Ddue.Tools.Reflection.ApiFilter.NamespaceContainsExposedMembers(Namespace space)
       at Microsoft.Ddue.Tools.Reflection.ApiFilter.IsExposedNamespace(Namespace space)
       at Microsoft.Ddue.Tools.Reflection.ApiVisitor.VisitApis()
       at Microsoft.Ddue.Tools.MRefBuilder.Main(String[] args)
  InnerException:
I checked the reflection.all file in the Working folder, and it was empty.
I've already spent several hours debugging this, but I can't find any clues as to what might be causing it.  This worked last week!
And this still works on my local development box (Windows Server 2008 x64), just not on the build server,
which is using VS2010 with .NET v4.0 Framework on a Windows Server 2003 R2 x86.
Has anyone else ran into this problem?  What am I missing here?
TIA
Ken
Coordinator
Jun 16, 2010 at 6:58 PM

This error has been seen a couple of times in the past and in those cases it was caused by the assembly being obfuscated.  If that's the case, build the documentation off of an unobfuscated version of the assembly.  Is it a .NET 4.0 assembly?  If so, you may be running into a problem with the current May 2008 release of Sandcastle which doesn't properly support all .NET 4.0 assemblies yet.

Eric

 

Jun 16, 2010 at 11:16 PM

Thanks for your comments, Eric.

I can't tell which assembly Sandcastle is having trouble with, but after two reboots this problem went away.  It probably was related to .NET 4.0, because that was the only change in the code recently.

Jun 24, 2010 at 12:31 PM

What happens if I'm using a third pary dll and I don't have a unobfuscated version of the dll?

Jun 24, 2010 at 2:04 PM

I tried the unobfuscated version. Still I get the same error

Coordinator
Jun 24, 2010 at 3:20 PM

Are you including it as a documentation source or as a reference?  If it's just a reference assembly that you don't want included in your documentation, add it as a reference in the References project node.  You can add the Visual Studio solution or project file as the documentation source instead and let SHFB figure out what to use.

Eric

 

Sep 23, 2010 at 9:06 PM

I'm having the exact same issue and have no clue how to resolve it.  Listed below is the actual log of my Sandcastle run.  I rebooted my server once and get the same error (KenSv's solution no workee).  Any help would be appreciated.

Leo

 

 

-------------------------------

[Sandcastle Help File Builder Utilities, version 1.9.1.0]

Creating output and working folders...

-------------------------------

Clearing working folder...

-------------------------------

Finding tools...

Found Sandcastle tools in 'C:\Program Files\Sandcastle\'

Searching for HTML Help 1 compiler...

Found HTML Help 1 compiler in 'C:\Program Files\HTML Help Workshop\'

-------------------------------

Validating and copying documentation source information

Source: C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\WEdgeNET.Complete.sln

Found project 'C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Services\WEdgeNET\Broker\Source\WEdgeNET.Broker.csproj'

Found project 'C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Services\WEdgeNET\Broker\UnitTests\Source\WEdgeNET.Broker.UnitTests.csproj'

Found project 'C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Services\WEdgeNET\Interfaces\Source\WEdgeNET.Shared.csproj'

Found project 'C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Services\WEdgeNET\ServiceProvider\Source\WEdgeNET.ServiceProvider.csproj'

Found project 'C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Services\WEdgeNET\ServiceProvider\UnitTests\Source\WEdgeNET.ServiceProvider.UnitTests.csproj'

Found project 'C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Test Harnesses\WEdgeNET\ServiceProvider\ICalculator\Source\WEdgeNET.ServiceProvider.SampleServices.csproj'

Found project 'C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Test Harnesses\WEdgeNET\ServiceProvider\ICalculator\UnitTests\Source\WEdgeNET.ICalculator.UnitTests.csproj'

Found project 'C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Services\WEdgeNET\BrokerHost\Source\WEdgeNET.BrokerHost.csproj'

Found project 'C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Services\WEdgeNET\ServiceProviderHost\Source\WEdgeNET.ServiceProviderHost.csproj'

Found project 'C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\ServiceProviderHost\ServiceProviderHost.csproj'

Found project 'C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Client\Source\WEdgeNET.Client.csproj'

Parsing project files

Found assembly 'C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Services\WEdgeNET\Broker\Source\..\..\..\..\Build\WEdgeNET.Broker.dll'

Found assembly 'C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Services\WEdgeNET\Broker\UnitTests\Source\..\..\..\..\..\Build\WEdgeNET.Broker.UnitTests.dll'

Found assembly 'C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Services\WEdgeNET\Interfaces\Source\..\..\..\..\Build\WEdgeNET.Shared.dll'

Found assembly 'C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Services\WEdgeNET\ServiceProvider\Source\..\..\..\..\Build\WEdgeNET.ServiceProvider.dll'

Found assembly 'C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Services\WEdgeNET\ServiceProvider\UnitTests\Source\..\..\..\..\..\Build\WEdgeNET.ServiceProvider.UnitTests.dll'

Found assembly 'C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Test Harnesses\WEdgeNET\ServiceProvider\ICalculator\Source\..\..\..\..\..\Build\WEdgeNET.ServiceProvider.SampleService.dll'

Found assembly 'C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Test Harnesses\WEdgeNET\ServiceProvider\ICalculator\UnitTests\Source\..\..\..\..\..\..\Build\WEdgeNET.Broker.UnitTests.dll'

Found assembly 'C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Services\WEdgeNET\BrokerHost\Source\..\..\..\..\Build\WEdgeNET.BrokerHost.exe'

Found assembly 'C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Services\WEdgeNET\ServiceProviderHost\Source\..\..\..\..\Build\WEdgeNET.ServiceProviderHost.exe'

Found assembly 'C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\ServiceProviderHost\..\Build\ServiceProviderHost.exe'

Found assembly 'C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Client\Source\..\..\Build\WEdgeNET.Client.dll'

SHFB: Warning BE0007: A project with a higher framework version was found. Changing project FrameworkVersion property from '3.5' to '4.0.30319' for the build

References to use:

Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL

PresentationCore

PresentationFramework

System

System.Configuration

System.Configuration.Install

System.Core

System.Data

System.Data.DataSetExtensions

System.Drawing

System.Runtime.Serialization

System.Runtime.Serialization.Formatters.Soap

System.ServiceModel

System.ServiceModel.Web

System.ServiceProcess

System.Web

System.Windows.Forms

System.WorkflowServices

System.Xaml

System.Xml

System.Xml.Linq

WEdge.NLog

WEdge.NLog, Version=1.0.0.505, Culture=neutral, PublicKeyToken=6a5b4d0c305779fe, processorArchitecture=x86

WedgeCore

WedgeCore, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6a5b4d0c305779fe, processorArchitecture=MSIL

WedgeCore.Interfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6a5b4d0c305779fe, processorArchitecture=MSIL

WedgeCore.Interfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6a5b4d0c305779fe, processorArchitecture=x86

WindowsBase

WindowsFormsIntegration

Copying XML comments files

C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Services\WEdgeNET\Broker\Source\..\..\..\..\Build\WEdgeNET.Broker.XML -> C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Help\Working\WEdgeNET.Broker.XML

C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Services\WEdgeNET\Interfaces\Source\..\..\..\..\Build\WEdgeNET.Shared.xml -> C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Help\Working\WEdgeNET.Shared.xml

C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Services\WEdgeNET\ServiceProvider\Source\..\..\..\..\Build\WEdgeNET.ServiceProvider.XML -> C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Help\Working\WEdgeNET.ServiceProvider.XML

C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Test Harnesses\WEdgeNET\ServiceProvider\ICalculator\Source\..\..\..\..\..\Build\WEdgeNET.ServiceProvider.SampleService.xml -> C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Help\Working\WEdgeNET.ServiceProvider.SampleService.xml

C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Services\WEdgeNET\BrokerHost\Source\..\..\..\..\Build\WEdgeNET.BrokerHost.xml -> C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Help\Working\WEdgeNET.BrokerHost.xml

C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Services\WEdgeNET\ServiceProviderHost\Source\..\..\..\..\Build\WEdgeNET.ServiceProviderHost.xml -> C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Help\Working\WEdgeNET.ServiceProviderHost.xml

C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Client\Source\..\..\Build\WEdgeNET.Client.XML -> C:\Builds\WEdgeOne\WEdgeNET\DevSandcastle\Sources\Help\Working\WEdgeNET.Client.XML

-------------------------------

Generating shared content files (en-US, English (United States))...

Last step completed in 00:00:00.0470

-------------------------------

Generating API filter for MRefBuilder...

Last step completed in 00:00:00.0000

-------------------------------

Generating reflection information...

[C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe]

GenerateRefInfo:

MrefBuilder (v2.6.10621.1)

Copyright c Microsoft 2006

Info: Loaded 11 assemblies for reflection and 21 dependency assemblies.

XslTransform (v2.6.10621.1)

Copyright c Microsoft 2005-2006

Info: Applying XSL transformation 'C:\Program Files\Sandcastle\ProductionTransforms\MergeDuplicates.xsl'.

reflection.all -> reflection.org

Error : The input file 'reflection.all' is not well-formed. The error is: Root element is missing.

Last step completed in 00:00:15.1090

-------------------------------

 

SHFB: Error BE0065: BUILD FAILED: Root element is missing.

Coordinator
Sep 24, 2010 at 2:30 AM

As with the original post, MRefBuilder is failing to parse one of your assemblies.  All you can do is try to find out which one.  As noted, if there is an obfuscated assembly in the mix, that could be causing the problem.  If it's just a reference assembly, make sure it's not being included as a documentation source.  Since it's a Sandcastle tool issue, it's not something I can fix in SHFB.

Eric