ReSharper ignores code in #IF sections

I just noticed that ReSharper is ignoring code placed in #IF sections in which the test isn't true. Ignoring this code during analysis seems appropriate, but ReSharper won't reformat it even if the condition is true when selecting Reformat Code and comes up with some really bizarre results when modifying or entering code in these sections. For example, let's say I have code like this:

#if false
if(this == that)
DoSomething();
#endif

If I position the insertion point on the D in DoSomething and type an opening brace, ReSharper gives me this odd result:

#if false
if(this == that)
{}DoSomething();
#endif

I delete the closing brace, put DoSomething(); on the next line, and then type a closing a brace:


#if false
if(this == that)
{
DoSomething();
}
#endif

Please sign in to leave a comment.