Skip to content

RCS1203: Use AttributeUsageAttribute code fix puts attribute above documentation comment #1680

@omccully

Description

@omccully

Version 4.14.0

/// <summary>
/// My documentation
/// <summary>
public class MyAttribute : Attribute
{

}

After code fix, the attribute is placed above the documentation comment:

[AttributeUsage(AttributeTargets.All, AllowMultiple = false)]

/// <summary>
/// My documentation
/// <summary>
public class MyAttribute : Attribute
{

}

This ordering of putting the AttributeUsage above the class documentation comment does not work for Visual Studio to recognize it as being on the class and causes a CS1591 analyzer warning.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions