mcintyre321
2009-09-24 13:58:59
Thank you for the comment. Unfortunately, it did not help. In the end R# just show that some css and asxc paths were not found/valid. But it did not say anyting about public methods/properties.
Antipod
2009-09-24 15:02:15
Thank you for the picture. "Errors in Solution" list has no errors and this is exactly what I had. Now I understand what you meant and think it can help. Is it possible to get a list with all unused methods in the solution in one "window" using R#, for instance in Error List?
Antipod
2009-09-25 14:50:57
You can configure the inspection severity in R# options so that they show up as warnings or errors.
mcintyre321
2009-09-25 15:04:11
Thank you for your time. Unfortunately, R# does not show (at least for me) public unused methods as errors, but shows private ones. I have R# 4.5. Does it show them for you?
Antipod
2009-09-25 15:17:14
Resharper menu => Options => Code Inspection => Inspection Severity => Unused Declaration => Non-private accessibility = Show as error
mcintyre321
2009-09-25 15:23:20
In fact, you can set loads of different Resharper suggestions as warnings on the Inspection Severity tab. You should be able to get the settings you want by manipulating those settings.
mcintyre321
2009-09-25 15:31:09
This is just what I did, but it does not work for me. As you can see in the original question screenshot (I added it after your suggestions), the unused method is highlighted as error (in red), because I did like you said. But "Errors in Solution" window does not show unused public method as error even when I have the setting enabled. Could you please do the same on your side and attach a screenshot?
Antipod
2009-09-25 15:51:17
Resharper 5 DOES show errros in solution. See the link in my answer for a pre-release build
mcintyre321
2009-10-23 09:44:26
+1
A:
Heck I have done it old school. I just comment out methods I don't think are being used and build. If I get an error, then I leave it there.
David Basarab
2009-09-24 13:59:37
But it is not a good way to solve the issue if you have pretty much classes. In this case it is a lot of work. We are programmers here and need to think how to automate the process.Thank you.
Antipod
2009-09-24 14:02:10
Also you only get errors if the method is being directly referenced, which is not always the case, e.g. for event subscribers in a IoC container
armannvg
2009-09-25 15:19:41