Skip to content

Apostrophe symbol in SQL Server column description is scaffolded as ' #34714

Description

@janseris

description on SQL Server column:
Filename under which map data are saved when cached on user's machine.

Generated C# XML documentation on the property:
Filename under which map data are saved when cached on user's machine.

Expected result:
Filename under which map data are saved when cached on user's machine.

EF Core version: 7
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 8
Operating system: Win11
IDE: Visual Studio 2022 17.11

Activity

  1. roji commented on Sep 19, 2024

    @roji
    Member

    XML documentation is, well, XML, and &apos; is a valid representation of the character in XML. EF must escape the string it reads from the description; for example, if your column description contains a < character, it must escaped or it will result in invalid XML. There may be a way to instruct the escaping to not escape when it's not strictly necessary (like in the apostrophe case), I'm not sure.

  2. ErikEJ commented on Sep 19, 2024

    @ErikEJ
    Contributor

    @janseris Does the description not look correct in your editor / intellisense?

  3. janseris commented on Sep 19, 2024

    @janseris
    Author

    XML documentation is, well, XML, and &apos; is a valid representation of the character in XML. EF must escape the string it reads from the description; for example, if your column description contains a < character, it must escaped or it will result in invalid XML. There may be a way to instruct the escaping to not escape when it's not strictly necessary (like in the apostrophe case), I'm not sure.

    Hi thank you well yes some symbols like ' are not necessary to be escaped in Visual Studio because they work even though not escaped. True that for >symbol the escaping is required because that would be malformed XML.
    @ErikEJ it looks correctly but only on mouseover and not in the generated text.

    So the overall issue is actually something like:
    Symbols which do not form malformed XML documentation in Visual Studio do not need to be escaped in generated XML documentation

  4. ErikEJ commented on Sep 19, 2024

    @ErikEJ
    Contributor

    Sounds like a non-issue to me.

  5. janseris commented on Sep 19, 2024

    @janseris
    Author

    It's more like a nice to have feature so that the generated text is more human readable for symbols which do not need to be escaped as @roji states.
    Current:
    obrazek
    Proposed:
    obrazek

  6. added this to the Backlog milestone on Sep 19, 2024
  7. roji commented on Sep 19, 2024

    @roji
    Member

    Putting on the backlog and assigning to @cincuranet (scaffolding).

  8. added theissue type on Jun 15, 2025
  9. removed their assignment
    on Dec 18, 2025
  10. added a commit that references this issue on Nov 13, 2026
    4c991ed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions