-
Notifications
You must be signed in to change notification settings - Fork 831
Description
This issue has been moved from a ticket on Developer Community.
[severity:It's more difficult to complete my work]
Hello,
I am using Visual Studio 2022, and I found the XML documentation generator (which uses code information and XML syntax in comments to produce a XML file, for documenting the code with other programs) is not escaping correctly the name of the type when writing to the XML file. This results in an invalid XML file.
I reproduced the problem with a simple new project, here is a definition of a "Equals" member in F# :
which produces the faulty XML document :
Please note that I have no control on how the name is generated by the documentation generator; my comment is simply "Test 3." and has no XML tag in it, so the problem is on the generator's side, it seems the angle brackets of the generic type is causing the problem.
I am not able to attach .fs files in the bug report (the filter on the Web site upload interface seems to block it) so here it is :
namespace XMLDocInvalid
module Say =
/// Test comment for type
[<CustomComparison; CustomEquality>]
type MyType =
| A of int
| B of bool
interface System.IComparable<MyType> with
/// test 1.
member this. CompareTo _ = 0
interface System.IComparable with
/// test 2.
member this. CompareTo _ = 0
interface System.IEquatable<MyType> with
/// test 3.
member this. Equals _ = true
/// test 4.
override this. Equals _ = true
/// test 5.
override this. GetHashCode() = 0xC0FFEE
let hello =
let x = A 42
printfn "Hello %A" x
Thank you.
Original Comments
(no comments)
Original Solutions
(no solutions)