How to disable namespace abbreviation in Visual Studio 2015?

What I want to disable ...

If I'm not mistaken, because in Visual Studio 2015 there is a new function that highlights the redundant parts of using the namespace. Also, when you automatically add usage to a certain member of the assembly using quick actions, the gray part is skipped.

For example, when using quick actions, only Whatever.Framework.Shared.Data.Mongo will be added as soon as Shared.Data.Mongo .

Is it possible to completely disable this refactoring function?

+5
source share
1 answer

You will see that this even goes back to Visual Studio 2012 (and possibly older) under the following circumstances:

 namespace Test.Foo { using Test.Foo.Bar; // can write using Bar public class Class1 { } } 

vs

 using Test.Foo.Bar; namespace Test.Foo { public class Class1 { } } 

The first will serialize the Test.Foo part Test.Foo. in the using statement since you are inside the namespace declaration. The second will not.

-1
source

Source: https://habr.com/ru/post/1236779/


All Articles