Have ReSharper keep 'using System;' when optimizing usings

前端 未结 2 2246
时光说笑
时光说笑 2021-02-19 13:20

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 t

相关标签:
2条回答
  • 2021-02-19 13:39

    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.

    0 讨论(0)
  • 2021-02-19 13:52

    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.

    0 讨论(0)
提交回复
热议问题