Jonathan Gilbert
Jonathan Gilbert

Reputation: 3840

Visual Studio Code: Disable implicit generation of using directives

In Visual Studio Code, if I type the name of an item from a namespace that is not imported, it automatically -- silently -- adds a using directive to the top of the file. Is it possible to turn this off? I don't want to get rid of the IntelliSense listing types from other namespaces, that's useful, but I personally would prefer selecting a non-imported type to simply generate a compile-time error. Many, many times now, I've found bizarre using directives at the top of files because at some point, I fat-fingered a type name. I backspaced it and corrected it, but the unnecessary using directive, added out of view, remains.

Upvotes: 0

Views: 159

Answers (0)

Related Questions