How do I prevent Visual Studio 2019 adding blank lines between using statements

Viewed 379

After updating Visual Studio 2019 to version 16.7.0 a few days ago, I noticed that it started creating annoying blank lines between using directives if the first part of the namespace is not the same.

For example:

using System;

using Alpha;
using Alpha.Foo;
using Alpha.Bar;

using Bravo;
using Bravo.Utils;
1 Answers

Assuming you are talking about C# source code/files, then: Select "Options" from the "Tools" menu and, in the displayed pop-up, navigate to "Text Editor ... C# ... Advanced" and uncheck the "Separate using directive groups" check-box, as shown below:

enter image description here

Related