How to leave (some) namespaces during code cleanup?

I have a lot of files that were filled with stuff autogenerated by ComponentOne.  Everything it creates, it uses the fully qualified namespace, i.e.:
System.Windows.Forms.Button btn1 = new System.Windows.Forms.Button();

If I run resharper code cleanup, it wants to change this to:

Button btn1 = new Button();

While yes, this is nicer, it hoses up the UI editing tools and you cannot modifiy your layout anymore due to an error in the ComponentOne parser.

Is there a way to do code cleanup, removing unused usings, yet leave explicit stuff like this?  I havent been able to find anything in the options.

Or maybe someone has had this problem as well and has a different solution?


1 comment

So to answer my own question, in case anyone runs into the same problem....

You have to run code cleanup, but before saying okay, select Edit Profiles.  Then add a new code cleanup profile, and reset everything to your tastes.

And make sure 'Shorten qualified references' is NOT checked.


Please sign in to leave a comment.