Stop Visual Studio from adding using statements
Asked Answered
F

1

17

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.

Filomenafiloplume answered 20/2, 2020 at 21:4 Comment(2)
I wonder if this is really VS. What extensions do you have installed? I would start there.Hyperthermia
Found the awnser here #61812325 "Found the fix. Under Tools > Options... > Text Editor > C# > IntelliSense, I had to uncheck 'Show items from unimported namespaces (experimental)'."Alphonsa
H
0

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

Hybrid answered 16/8 at 9:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.