Stop VS from automatically adding using directives

无人久伴 提交于 2020-07-06 20:18:30

问题


I don't mind the using directives which are automatically created when the script is created. Those are fine. What I'm talking about are the using directives which are automatically generated at the top of the script while I'm coding as soon as I refer to a type which is out of scope. A pox upon the silent fiends!

To clarify, currently if I try including a type which exists in some namespace which is not yet declared as 'using' in the script, said namespace will get auto-added to the top of the script. This is undesired behavior for me.

I simply prefer to manually add my namespaces.

EDIT: Found the fix. Under Tools > Options... > Text Editor > C# > IntelliSense, I had to uncheck 'Show items from unimported namespaces (experimental)'.

来源:https://stackoverflow.com/questions/61811825/stop-vs-from-automatically-adding-using-directives

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!