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

The input file 'reflection.all' is not well-formed

Feb 2, 2009 at 11:39 PM
I am using SFHB for the first time and am getting the error above.

The output is - 


[Sandcastle Help File Builder GUI, version]

Creating output and working folders...


Clearing working folder...


Finding tools...

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

Warning: MRefBuilder has a version of '2.4.10522.0' but version '2.4.10520.1' was expected. You may need to update your copy of the help file builder.

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


Validating and copying documentation assembly information...

C:\Documents and Settings\mike.mullen\My Documents\OnTargetJobDocs\OTJ_Liquid_Tech\OTJ_Liquid_Tech\OTJ.ResumeSearch.CandidateObjects\bin\Debug\OTJ.ResumeSearch.CandidateObjects.dll -> C:\Documents and Settings\mike.mullen\My Documents\OnTargetJobDocs\OTJ_Liquid_Tech\OTJ_Liquid_Tech\OTJ.ResumeSearch.CandidateObjects\bin\Debug\Help\Working\OTJ.ResumeSearch.CandidateObjects.dll

C:\Documents and Settings\mike.mullen\My Documents\OnTargetJobDocs\OTJ_Liquid_Tech\OTJ_Liquid_Tech\OTJ.ResumeSearch.CandidateObjects\bin\Debug\OTJ.ResumeSearch.CandidateObjects.XML -> C:\Documents and Settings\mike.mullen\My Documents\OnTargetJobDocs\OTJ_Liquid_Tech\OTJ_Liquid_Tech\OTJ.ResumeSearch.CandidateObjects\bin\Debug\Help\Working\OTJ.ResumeSearch.CandidateObjects.XML


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

Last step completed in 00:00:00.0000


Copying documentation assembly dependencies...

C:\Documents and Settings\mike.mullen\My Documents\OnTargetJobDocs\OTJ_Liquid_Tech\OTJ_Liquid_Tech\OTJ.ResumeSearch.CandidateObjects\bin\Debug\LiquidTechnologies.Runtime.Net35.dll -> C:\Documents and Settings\mike.mullen\My Documents\OnTargetJobDocs\OTJ_Liquid_Tech\OTJ_Liquid_Tech\OTJ.ResumeSearch.CandidateObjects\bin\Debug\Help\Working\DLL\LiquidTechnologies.Runtime.Net35.dll

C:\Documents and Settings\mike.mullen\My Documents\OnTargetJobDocs\OTJ_Liquid_Tech\OTJ_Liquid_Tech\OTJ.ResumeSearch.CandidateObjects\bin\Debug\LiquidTechnologies.Common.dll -> C:\Documents and Settings\mike.mullen\My Documents\OnTargetJobDocs\OTJ_Liquid_Tech\OTJ_Liquid_Tech\OTJ.ResumeSearch.CandidateObjects\bin\Debug\Help\Working\DLL\LiquidTechnologies.Common.dll

Last step completed in 00:00:00.0156


Generating API filter for MRefBuilder...

Last step completed in 00:00:00.0625


Generating reflection information...

[C:\Documents and Settings\mike.mullen\My Documents\OnTargetJobDocs\OTJ_Liquid_Tech\OTJ_Liquid_Tech\OTJ.ResumeSearch.CandidateObjects\bin\Debug\Help\Working\GenerateRefInfo.bat]

MrefBuilder (v2.4.10522.0)

Copyright c Microsoft 2006

Info: Loaded 1 assemblies for reflection and 2 dependency assemblies.

Unhandled Exception: System.ArgumentException: '', hexadecimal value 0x02, is an invalid character.

at System.Xml.XmlEncodedRawTextWriter.InvalidXmlChar(Int32 ch, Char* pDst, Boolean entitize)

at System.Xml.XmlEncodedRawTextWriter.WriteAttributeTextBlock(Char* pSrc, Char* pSrcEnd)

at System.Xml.XmlEncodedRawTextWriter.WriteString(String text)

at System.Xml.XmlEncodedRawTextWriterIndent.WriteString(String text)

at System.Xml.XmlWellFormedWriter.WriteString(String text)

at System.Xml.XmlWriter.WriteAttributeString(String localName, String value)

at Microsoft.Ddue.Tools.ManagedReflectionWriter.WriteApiData(Member api)

at Microsoft.Ddue.Tools.ManagedReflectionWriter.WriteMember(Member member, TypeNode type)

at Microsoft.Ddue.Tools.ManagedReflectionWriter.WriteTypeElements(TypeNode type)

at Microsoft.Ddue.Tools.ManagedReflectionWriter.WriteType(TypeNode type)

at Microsoft.Ddue.Tools.ManagedReflectionWriter.VisitType(TypeNode type)

at Microsoft.Ddue.Tools.Reflection.ApiVisitor.VisitTypes(TypeNodeList types)

at Microsoft.Ddue.Tools.Reflection.ApiVisitor.VisitNamespace(Namespace space)

at Microsoft.Ddue.Tools.ManagedReflectionWriter.VisitNamespace(Namespace space)

at Microsoft.Ddue.Tools.Reflection.ApiVisitor.VisitNamespaces(NamespaceList spaces)

at Microsoft.Ddue.Tools.ManagedReflectionWriter.VisitNamespaces(NamespaceList spaces)

at Microsoft.Ddue.Tools.Reflection.ApiVisitor.VisitApis()

at Microsoft.Ddue.Tools.MRefBuilder.Main(String[] args)

1 file(s) copied.

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: There is an unclosed literal string. Line 1078, position 26.

Last step completed in 00:00:03.0780


BUILD FAILED: Unexpected error in last build step. See output above for details.

The content of the reflection.all file ends with 

<element api="M:LiquidTechnologies.Runtime.Net35.XmlObjectBase.System#Xml#Serialization#IXmlSerializable#GetSchema">

<apidata name="

I believe the #'s are causing the problem - not sure what to do.

Please help

Feb 3, 2009 at 12:31 AM
Edited Feb 3, 2009 at 12:36 AM
The warning earlier in the log indicates the problem:

Warning: MRefBuilder has a version of '2.4.10522.0' but version '2.4.10520.1' was expected. You may need to update your copy of the help file builder.

Did you somehow get an advanced copy of the next release of Sandcastle or have you rebuilt it from the source code?  Either way, the solution is to download and install the last official release of Sandcastle (May 2008).

If it fails after that, there's an issue with the assembly.  The hash signs are normal (explicit interface implementations).  It failed on a hex 0x02 character.  If the assembly is obfuscated and you are including private members, that can also cause issues and may account for the problem with the odd character.


Feb 3, 2009 at 3:34 PM

The Warning is gone - Thanks.  But the error still occurs.

Are the #'s causing the problem?

The reflection.all still ends with

<element api="M:LiquidTechnologies.Runtime.Net35.XmlObjectBase.System#Xml#Serialization#IXmlSerializable#GetSchema">

<apidata name="

Feb 3, 2009 at 4:19 PM
As I said in the prior reply, the hash signs are normal (explicit interface implementations).  It failed on a hex 0x02 character.  If the assembly is obfuscated and you are including private members, that can also cause issues and may account for the problem with the odd character.  If you can use the failing class to create a test case, create a work item over in the Sandcastle project to report the problem.  If you are including private/internal members, turn off the DocumentPrivates and DocumentInternals properties for the time being to work around the issue.

Feb 3, 2009 at 5:14 PM
LiquidTechnologies assemblies are just used as despendancies.  Why are they being included?  I have the DocumentPrivate and DocumentInternals turned off.   I have tried to edit the MRefBuilder.config to exclude these but am not sure if  I am doing that correctly.
Feb 3, 2009 at 7:52 PM
Anything in your classes that inherits from those classes will cause MRefBuilder to pull in the base class member info to show on the Members page.  If the members are public, I don't know why there would be bad characters in the member name.  You can probably use a test assembly that doesn't fail to generate an API filter with SHFB and then cut and paste it into the failing assembly's help file project.  You could then edit the API filter to exclude the members that cause the issue.  If you can send me a test case, I can perhaps find out why MRefBuilder is failing and patch it.  I've done that for a couple of other issues that people have had with it.