Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS 2015 - C# simplify/truncate using namespaces

Tags:

I would prefer the following

 using Truncating.Long.Using.Namespace.Xxx;

Visual Studio 2015, does the following

using Xxx;

I figured out, that I can change the behavior for the code hint (IDE0001) by adjusting "Code Analysis" settings.

But I could not figure out how to STOP the behavior, for the Ctrl-. inserting a missing namespace.

Does anyone have some directions or feedback about this?

like image 728
iwhp Avatar asked Sep 16 '15 08:09

iwhp


1 Answers

I haven't found an option for this natively in Visual Studio, but the Resharper extension provides support for this. It's been an option since version 5, under Code Style, called "Prefer fully qualified using name at nested scope"

like image 198
Bobson Avatar answered Sep 20 '22 19:09

Bobson