Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

dotnet format adds RequiresUnreferencedCode attributes in .NET 10 RC2 #51326

Copy link
Copy link
@jamescrosswell

Description

@jamescrosswell
Issue body actions

In .NET 10 RC2, dotnet format appears to automatically add RequiresUnreferencedCode and DynamicallyAccessedMembers attributes to code.

See this commit, for example (we have a bot that automatically runs dotnet format to ensure code consistency).

In this particular case, it's added those attributes to a bunch of code in our test assemblies where they make no sense. We can't compile those tests AOT (and would never be trimming them) so these attributes just break things unnecessarily.

Is there any way to disable this behaviour?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.