2010-04-06 55 views
1

我正在嘗試使用Sandcastle幫助文件生成器爲我的程序集生成幫助文件。 當我運行生成我得到以下錯誤:Sandefast上的MRefBuilder無效字符異常

MrefBuilder (v2.4.10520.1) 
    Copyright c Microsoft 2006 
    Info: Loaded 1 assemblies for reflection and 15 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.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) 

我也從命令行運行時,出現此錯誤。

我用十六進制編輯器來檢查VS輸出的​​Documentation.xml文件中沒有字符0x02。

有沒有人有任何線索或建議?

謝謝

回答

0

它似乎與我必須用於連接到SAP的DLL有關。 ERP連接。一旦我消除了這個名稱空間,一切都很順利。

+0

您可以詳細說明如何消除該名稱空間嗎?我遇到了同樣的問題。 – rifferte 2010-06-09 15:08:15

+0

我創建了一個名爲「NamespaceDoc.cs」的類 我把它放在我的問題命名空間中,然後在類上設置[System.Runtime.CompilerServices.CompilerGenerated()]屬性。 這迫使它忽略此命名空間中的所有類 – taylonr 2010-06-09 18:50:25