Skip to content

Source generator not escaping dashes in assembly name #1800

@manodasanW

Description

@manodasanW

Our source generator has logic to escape the assembly name as it is used as part of the namespace for generated sources. The escaping logic doesn't handle dashes which it should.

    public static string EscapeTypeNameForIdentifier(string typeName)
    {
        return Regex.Replace(typeName, """[(\ |:<>,\.)]""", "_");
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions