使用指令添加时,如何防止ReSharper缩短名称空间? [英] How to prevent ReSharper from shortening namespaces when adding using directives?
问题描述
当我使用ReSharper添加using指令(使用Alt + Enter)时,它将删除名称空间的不必要"部分.我更喜欢使用完整的名称空间,这也是Visual Studio的行为.
When I use ReSharper to add a using directive (using Alt+Enter) it removes "unnecessary" parts of the namespace. I prefer using the full namespace which is also the behavior of Visual Studio.
示例:
namespace MyCompany.MyTool.Data
{
// This is what ReSharper gives me:
using Core;
// This is what I want:
using MyCompany.MyTool.Core;
// ...
}
在ReSharper 4.5中我必须更改哪些设置,以便它使用完整的名称空间?
Which setting do I have to change in ReSharper 4.5 so it uses the full namespace?
推荐答案
目前我尚未安装ReSharper 4.5,但是在5.0中,命名空间导入"窗格中有一个名为Prefer fully qualified using name at nested scope
的选项.可能就是您要寻找的那个.
I don't have ReSharper 4.5 installed at the moment, but in 5.0 there's an option at the Namespace Imports pane called Prefer fully qualified using name at nested scope
. It might be the one you're looking for.
这篇关于使用指令添加时,如何防止ReSharper缩短名称空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!