[英]Have ReSharper keep 'using System;' when optimizing usings
I was wondering if there is some option to keep ReSharper from removing just the using System;
我想知道是否有一些选项可以让ReSharper不再
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)? 另外,有没有办法让ReSharper像Visual Studio 2008那样对剩余的指令进行排序(按字母顺序,我认为)?
Thanks. 谢谢。
Yes, there is such an option: ReSharper->Languages->C#->Namespace Imports. 是的,有这样一个选项:ReSharper-> Languages-> C# - > Namespace Imports。 You can add namespaces,that should not be removed, as well as namespaces, that should always be imported.
您可以添加不应删除的名称空间以及应始终导入的名称空间。
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. 是的,在选项(
Resharper
> Options
> Languages
> C#
)中,有一个Namespace Imports
部分,允许您指定永远不应删除的名称空间。 You would put System
into the prompt it gives. 您可以将
System
置于其提供的提示中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.