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?