Skip to content

EnC update on method with custom attribute duplicates the attribute #52816

@vritant24

Description

@vritant24

Given the following method:

[Custom]
public int Method()
{
    return 3;
}
public class CustomAttribute : System.Attribute {}

if there is an edit to change the return statement to return 2, applying the updates from the EnC service leads to 2 [Custom] attributes on Method() during runtime.
Every successive edit adds another instance of the attribute to the CustomAttributes list.

This is an issue in testing because xunit only accepts 1 [Fact] attribute on a method and throws if multiple exist.

Metadata

Metadata

Assignees

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