The warning "Unused public member" exists even if SWEA is OFF
As some of you may have probably noticed, ReSharper 2018.1 has a couple of changes in the code analysis behavior.
Before 2018.1 was out if there was a public class/method/property/etc. which was not used in the solution and Solution Wide Error Analysis (SWEA) was turned ON, ReSharper would mark it as unused and suggested deleting it.
Starting from 2018.1, ReSharper knows how to show the same warning for this case even with no SWEA enabled. It is nice to have such a feature available without running such a resource-intensive task as SWEA.
However, in some cases, public members might be used in a public API, so removing them will break everything. To let ReSharper know about the fact that it is an API member, you need to add the PublicAPI attribute to the member from the JetBrains.Annotations package.
To return the old behavior to ReSharper 2018.1, please untick the option Show unused non-private type members when solution-wide analysis is off on the page ReSharper | Options | Code Inspection | Settings.
Please sign in to leave a comment.