I have a public facing interface in one project that will end up becoming a nuget package. Here is the code:
public interface MyInterface
{
void MyMethod();
}
Now every method in this interface is not used in this library but is used in other via the package. However, every single method here has a warning of Method x is never used.
Is there a simple way to tell ReSharper to ignore every public method in every project in every solution that I ever open to not perform this check in public methods.
I have a couple of ways to fix this but it is far too tedious.
Option 1: [UsedImplicitly]
on every method inside my class. This is far too tedious in my opinion.
Option 2: [SuppressMessage("ReSharper", "UnusedMember.Global")]
A little less tedious, but still have to implement on every class.
There has to be a better way?
I also read somewhere that this only happens if Enable solution-wide analysis
is checked. In my case it is not. I found this setting under Reshaper Options > Code Inspection > Settings
In your case, since you've mentioned that SWEA is disabled, I would recommend disabling the following checkbox ReSharper | Options | Code Inspection | Settings | General | Show unused non-private type members when solution-wide analysis is off
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With