1
C++ Reference (ampersand) not escaped in generated XML
Problem reported by Kenneth Porter - 3/14/2021 at 8:27 AM
Resolved
I'm documenting a C++/CLI header that wraps a native C++ class for use by a C# application. Each wrapper class declares an accessor for a reference to the underlying native class:

/// NativeFoo &.   NativeFoo& getNative();

The generated XML fails to convert the ampersand to the entity & and VS2019 complains about this:

warning C4635: XML document comment applied to Foo'.getNative': badly-formed XML: Only one top level element is allowed in an XML document.

I can manually fix the XML comment to make VS2019 happy.

3 Replies

Reply to Thread
0
Misha Zhutov Replied
Employee Post Marked As Resolution
Hi Kenneth,

Thank you for reporting that. We have already fixed the issue. The fix will be available in the vNext.
0
Kenneth Porter Replied
I'm finding that Sandcastle is throwing warnings for routines taking a native reference parameter, since there's no "assembly" for the native DLL being referenced that it can reflect. Are there any guidelines on how to handle that? Do I need to <exclude /> such methods? I just want to suppress the warning so I can see real issues in the output. 
1
Misha Zhutov Replied
Employee Post
Yes, you can <exclude /> such methods. It will allow you to suppress the warning.

Reply to Thread