Optimizing "using" directives on code with #if precompiler directives...

I'm not sure if this is a bug, but it certainly is annoying.
If I reformat a file that contains conditional debug code blocks whilst in
"Release" mode, the usings/imports for types referenced in that block are
removed (provided the namespace is not used elsewhere).
This means that when I go back to "Debug" mode, a get a bunch of unresolved
type references.

using System.Windows.Forms; //this will be removed

static class Program
static void Main()


Please sign in to leave a comment.