I'm using the latest release of resharper. Just downloaded and installed last week so I'm new to using it. The problem I'm having is that in my ASP.NET MVC application all of my controllers say they are never used and all the methods within the controller say they are never used.
Is there a way to suppress the messages or for resharper to understand they are used?
You can turn on/off the various warnings and hints that Resharper gives you.
HOWEVER, if you write unit tests then they WILL be used and Resharper will be happy.
update
You could consider telling Resharper to ignore the unused members of your controller by doing this at the top and bottom of your controller class...
public class MyController: Controller
{
// ReSharper disable UnusedMember.Global
...
// ReSharper restore UnusedMember.Global
}
... or, at least put these comments around the public methods on your controller (I use StyleCop and so all the public methods will be grouped together anyway. This is reasonably unobtrusive, and would get rid of this warning from Resharper.
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