There's a great feature in Visual Studio 2015.3 and Visual Studio 2017 that is turned off by default. It does use about ~10 megs of memory but it makes me so happy that I turn it on.
Visual Studio 2015.3和Visual Studio 2017中有一个很棒的功能,默认情况下处于关闭状态。 它确实使用了大约10兆的内存,但是让我很高兴能打开它。
It's under C# | Advanced in Tools Options. Or you can just type "Advanced" in the Quick Launch Bar (via Ctrl+Q if you like) to jump there.
在C#下| 工具选项中的高级。 或者,您也可以在快速启动栏中键入“高级”(如果需要,可以通过Ctrl + Q组合键)跳到那里。
I turn on "Suggest usings for types in NuGet packages" and "Suggest usings for types in reference assemblies."
我打开“ NuGet包中类型的建议用法”和“参考程序集中的类型的建议用法”。
For example, if I am typing some code and start referencing a Type that isn't in my project but could be...you know how sometimes you just need a using statement to bring in a namespace? In this Web App, I already have Json.NET so it recommends a using statement to bring it into scope.
例如,如果我输入一些代码并开始引用不在我的项目中但可能是...的Type,您知道有时您只需要使用using语句来引入名称空间吗? 在此Web应用程序中,我已经拥有Json.NET,因此建议使用using语句将其纳入范围。
But in this Console App, I have no packages beyond the defaults. When I start using a type like JObject from a popular NuGet, Visual Studio can offer to install Json.NET for me!
但是在此控制台应用程序中,我没有默认值以外的任何程序包。 当我从流行的NuGet开始使用类似JObject的类型时,Visual Studio可以为我安装Json.NET!
Or another example:
或另一个例子:
And then I can immediately continue typing with intellisense. If I know what I'm doing, I can bring in something like this without ever using the mouse or leaving the line.
然后,我可以立即继续使用intellisense进行输入。 如果我知道自己在做什么,则可以使用这样的东西而无需使用鼠标或离开生产线。
Good stuff!
好东西!
Sponsor: Check out JetBrains Rider: a new cross-platform .NET IDE. Edit, refactor, test, build and debug ASP.NET, .NET Framework, .NET Core, or Unity applications. Learn more and get access to early builds!
赞助商:查看JetBrains Rider :一个新的跨平台.NET IDE 。 编辑,重构,测试,构建和调试ASP.NET,.NET Framework,.NET Core或Unity应用程序。 了解更多信息并获得早期版本!