Hello All,
I have been using the Sandcastle December CTP and found a small section of code which causes BuildAssembler.exe to generate an XML exception. I have included the code (do not be concerned with the functionality of the code, it is purely for recreating the exception) which you can use to reproduce the exception. The code compiles without any errors or warnings, but for some reason BuildAssembler.exe does not seem to like it. I have also included details of the exception to help trace the problem, but if you copy my attached code you should be able to recreate the same exception.
The code which causes the exception in BuildAssembler.
namespace XMLTagsDemo2
{
/// <summary>
/// Represents the list of all installed modules.
/// </summary>
/// <example>
/// This partial example shows the class implementing this interface.
/// <code title="CS">
/// public class ModuleCollection : IMyInstalledModules
/// {
/// #region IEnumerable<IMyInstalledModules> Members
///
/// /// <summary>
/// /// Get an enumeration of modules
/// /// </summary>
/// /// <returns></returns>
/// public IEnumerator<IMyInstalledModules> GetEnumerator()
/// {
/// EnsureLoaded();
/// return installedModules.Values.GetEnumerator();
/// }
///
/// #endregion
/// }
/// </code>
/// </example>
public interface IMyInstalledModules
{
/// <summary>
/// Loads the installed modules.
/// </summary>
/// <remarks>
/// The installed modules would normally be listed in the database in the dbo.ApplicationModule table.
/// </remarks>
void Load();
}
}
The Exception
Unhandled Exception: System.Xml.XmlException: The 'IMyInstalledModules' start tag on line 3 does not match the end tag of 'span'. Line 3, position 314.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag)
at System.Xml.XmlTextReaderImpl.ParseEndElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
at System.Xml.XmlLoader.ParsePartialContent(XmlNode parentNode, String innerxmltext, XmlNodeType nt)
at System.Xml.XmlElement.set_InnerXml(String value)
at SandcastleBuilder.Components.CodeBlockComponent.Apply(XmlDocument document, String key)
at Microsoft.Ddue.Tools.BuildAssembler.Apply(IEnumerable`1 manifest)
at Microsoft.Ddue.Tools.BuildAssembler.Apply(String manifestFile)
at Microsoft.Ddue.Tools.BuildAssemblerConsole.Main(String[] args)
Regards,
Michael

Sandcastle December CTP - BuildAssembler throws XML exception.
Will Merydith
The #region title isn't being HTML encoded for the collapsed block. I've fixed it and it'll be in the next release of the help file builder and components. In the meantime, you can work around the issue by adding "outlining="false" to the <code> tag or manually encoding the angle brackets (#region IEnumerable&lt;IMyInstalledModules&gt; Members).
Eric
Jos&#233; Antonio Farias - MVP
The error looks like it's occurring in the CodeBlockComponent so it's most likely my issue not BuildAssembler's. I'll take a look into it.
Eric
George2
The basic <code> tag has no attributes. These are custom attributes that I defined for use with the CodeBlockComponent new in v1.3.3.1. See the help file for details.
Eric
Mahmoud_Fayed
Eric,
Thank you for looking into this problem. I have tried your suggestion of adding the "outlining=false" to the <code> tag and it now generates the help file. I have looked through the Visual Studio 2005 help and cannot see this attribute mentioned. Is there a list anywhere of the attributes that can be used with the <code> tag.
Michael.