My concern is that in the code style that we use in the company the using directives are put inside the namespace, but I'm not able to do that automatically. I have and.editorConfig file that suggest to move the directives.
This works great, but what I want to achieve if it's possible is to move them automatically when I format the file.
Language: c# Visual Studio Version 16.9.1
You can actually change this in the settings directly:
Text Editor -> C# -> Code Style -> General -> 'using preferences:'
There you can change Preferred 'using' directive placement from Outside namepace to Inside namespace .
In addition you can also click on the light bulb next to a misplaced using directive and choose "Move misplaced using directives" and there, in the opening submenu "Fix all occurrences in: Document | Project | Solution" to select "Solution" .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.