Have ReSharper keep 'using System;' when optimizing usings
Asked Answered
L

2

13

I was wondering if there is some option to keep ReSharper from removing just the using System; directive? Perhaps this is configurable somewhere?

Also, is there a way to have ReSharper sort the remaining directives just as Visual Studio 2008 does it (alphabetically, I think)?

Thanks.

Laomedon answered 10/12, 2008 at 13:19 Comment(0)
D
17

Yes, there is such an option: ReSharper->Languages->C#->Namespace Imports. You can add namespaces,that should not be removed, as well as namespaces, that should always be imported.

Doublespace answered 10/12, 2008 at 13:30 Comment(0)
M
5

Yes, in the options (Resharper > Options > Languages > C#), there is a Namespace Imports section that allows you to specify namespaces that should never be removed. You would put System into the prompt it gives.

Minnesinger answered 10/12, 2008 at 13:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.