If I'm building a debug solution and I have
#if !DEBUG
public void DoA()
{
DoB();
}
#endif
public void DoB()
{
}
When I use resharper to do a Find Usages
on DoB nothing is found. The purpose of find usages is to find all the usages of a certain method not just those used in a particular build configuration.
Is this something I can disable as it makes refactoring with Resharper less predictive.
Resharper build is: 5.1.3000.12
#if
+co. are there to logically, even physically after the first step in compilation, cut out and throw away code. In that, anything that is inside such cut out piece of code, which may not even be code but rather everything fitting the source character set (like#if 0 \n <insert 'A midsummer night's dream' here>\n#endif
), might (IMHO) validly not considered used code. – Sebastian Mach