Code Cleanup ignores disabled RedundUsingDirective

When I have:

// ReSharper disable RedundantUsingDirective
using Some.Namespace
// ReSharper restore RedundantUsingDirective


And then run code cleanup, the using directive is still removed. Is this a known bug? I can send a screencast of what it looks like before and after...

1 comment

Hello,

The //ReSharper disable RedundantUsingDirective comment affects only code
analysis and at the moment doesn't prevent Code Cleanup from removing that
using directive. As a workaround, you can add your namespace to 'Namespaces
that should not be removed' list under ReSharper | Options | Languages |
C# | Namespace Imports. Thank you!

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

When I have:

 RedundantUsingDirective
> using Some.Namespace
> // ReSharper restore RedundantUsingDirective]]>

And then run code cleanup, the using directive is still removed. Is
this a known bug? I can send a screencast of what it looks like.

---
Original message URL:
http://devnet.jetbrains.net/message/5318275#5318275



0

Please sign in to leave a comment.