Skip to content

Config generator emits uncompilable code for certain type conflicts #90976

@stephentoub

Description

@stephentoub

The implementation does name mangling, but those mangled names can conflict with other names, e.g.

using Microsoft.Extensions.Configuration;

IConfiguration configuration = new ConfigurationBuilder().Build();

var c1 = new Cint();
var c2 = new C<int>();
configuration.Bind(c1);
configuration.Bind(c2);

internal class C<T>
{
    public int Value { get; set; }
}

internal class Cint
{
    public int Value { get; set; }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions