If a name space summary has an ampersand it will throw the following error when building the documentation:
---- error start ---
An error occurred while parsing EntityName. Line 1079, position 833715.
Exception: NDoc3.Core.DocumenterException
An error occurred while parsing EntityName. Line 1079, position 833715.
Exception: System.Xml.XmlException
An error occurred while parsing EntityName. Line 1079, position 833715.
Exception: NDoc3.Core.DocumenterException
at NDoc3.Documenter.Msdn.MsdnDocumenter.Build(Project project)
at NDoc3.Gui.BuildWorker.ThreadProc()
Exception: System.Xml.XmlException
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
at System.Xml.XmlTextReaderImpl.Throw(String res)
at System.Xml.XmlTextReaderImpl.ParseEntityName()
at System.Xml.XmlTextReaderImpl.ParseEntityReference()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlTextReader.Read()
at System.Xml.XmlCharCheckingReader.Read()
at System.Xml.XsdValidatingReader.Read()
at NDoc3.Core.Reflection.NDocXmlGenerator.ValidateNDocXmlInternal(XmlReader reader)
at NDoc3.Core.Reflection.NDocXmlGenerator.ValidateNDocXml(TextReader ndocXmlSource, Boolean autoClose)
at NDoc3.Core.Reflection.NDocXmlGenerator.ValidateNDocXml(FileInfo ndocXmlSource)
at NDoc3.Core.Reflection.NDocXmlGenerator.MakeXmlFile(FileInfo xmlFile, Formatting formatting, Int32 indentation, Char indentChar)
at NDoc3.Core.Reflection.NDocXmlGenerator.MakeXmlFile(FileInfo xmlFile)
at NDoc3.Core.Reflection.NDocXmlGenerator.MakeXmlFile(FileInfo xmlFile)
at NDoc3.Core.Reflection.ReflectionEngine.MakeXmlFile(NDocXmlGeneratorParameters args, FileInfo xmlFile)
at NDoc3.Core.Reflection.BaseReflectionDocumenter.MakeXmlFile(Project project, FileInfo outputFile)
at NDoc3.Documenter.Msdn.MsdnDocumenter.CreateNDocXml(Project project)
at NDoc3.Documenter.Msdn.MsdnDocumenter.Build(Project project)
---- error end ---
Suspect & need to be entered as &
Assumt this might apply to other html entities?
This is correct & needs to be entered as & and this also applies to other XML entities, such as <, >, " and '.
As XML documentation files are created by the compiler, there isn't much we can do about this. If the entities are formatted correctly it will result in a invalid XML file.
The best solution are to always encode the entities correctly in the source file, but basically it should be the compiler who ensures correctly formatted documentation files.
We may implement a optional automatic check for wrongly encoded entities in the future, but it is not on the current todo list. Instead are more describing error message should be shown.