让 ReSharper 继续“使用系统” 优化使用时
我想知道是否有一些选项可以阻止 ReSharper 仅删除 using System;
指令? 也许这可以在某处配置?
另外,有没有办法让 ReSharper 对剩余指令进行排序,就像 Visual Studio 2008 那样(我认为按字母顺序)?
谢谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,有这样一个选项:ReSharper->Languages->C#->Namespace Imports。 您可以添加不应删除的命名空间以及应始终导入的命名空间。
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.
是的,在选项 (
Resharper
>Options
>Languages
>C#
) 中,有一个 < code>Namespace Imports 部分,允许您指定永远不应删除的命名空间。 您可以将System
放入它给出的提示中。Yes, in the options (
Resharper
>Options
>Languages
>C#
), there is aNamespace Imports
section that allows you to specify namespaces that should never be removed. You would putSystem
into the prompt it gives.