Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stop Visual Studio from adding using statements

It appears that Visual Studio 2019 is adding using statements when I do not intend for it to. While I do really like the right-click Quick Action to add a missing using, I do not want it happening when I do not ask for it.

It's hard to track down when this happens as I'm often typing quickly and only later on do I notice the new using.

like image 498
Daniel Williams Avatar asked Nov 23 '25 13:11

Daniel Williams


1 Answers

There is an options where you can disable it:

Tools/Options/Text Editor/C#/Advanced/

In Using Directives group: 'Add missing directives on paste'

Screenshhot

like image 66
György Gulyás Avatar answered Nov 26 '25 10:11

György Gulyás



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!