问题
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.
Example:
namespace MyCompany.MyTool.Data
{
// This is what ReSharper gives me:
using Core;
// This is what I want:
using MyCompany.MyTool.Core;
// ...
}
Which setting do I have to change in ReSharper 4.5 so it uses the full namespace?
回答1:
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.
来源:https://stackoverflow.com/questions/1964501/how-to-prevent-resharper-from-shortening-namespaces-when-adding-using-directives