本文章为机器翻译。 https://blogs.msdn.microsoft.com/dotnet/2018/12/13/visual-studio-2019-net-productivity/
我希望你听到的第一个预览Visual Studio 2019现在是可用的。在这篇文章中,我将介绍一些生产率改进。NET开发我们最兴奋。一个完整的清单,检查了版本说明。
Regex Language Support
任何regular expressionsin your C# or Visual Basic files now have syntax highlighting, compiler diagnostics, and code fixes! This parsing support canrecognize strings passed to the regex constructor 和strings immediately preceded with a comment containing the string language=regex
。这个language features currently included in this release areclassification,brace matching,highlight references,和编译器的诊断。
Video Player
00:00
00:15
对editorconfig口编辑器设置
你现在可以编辑设置一个出口editorconfig文件通过工具>选项>文本编辑器> C # >代码风格与按钮”的生成。editorconfig文件设置”。
生成代码的样式设置为editorconfig文件。
代码修复和重构
我们增加了几个高层请求的代码修正和重构在Visual Studio 2019预览版1。许多人通过社区所以脱帽向我们的可怕的人!重构和快速的动作可以用(Ctrl +。)或(Alt + Enter)。
Foreach循环LINQ查询
foreach循环LINQ查询或LINQ方法现在加入其他循环重构选项包括将LINQ to foreach,for循环foreach foreach循环,和。
Video Player
00:00
00:08
添加“使用“复制/粘贴的声明
Video Player
00:00
00:09
将匿名类型的类
Video Player
00:00
00:09
Convert local function to method
Video Player
00:00
00:07
More new code fixes and refactorings:
Convert tuple to a named-struct.
Dead code analysis for unused private members with an optional code fix to remove unused member declaration.
Generate a deconstruct method.
Add “await” where it is implied, but there is no compiler warning.
View all the code fixes and refactorings for .NET in our文件。
Document health indicator
The document health indicator allows you to look in one place to know if code style errors or warnings are present in the file you have open and makes it easy to jump to them. The indicator appears in the bottom right corner of your code editor making it easy to accesscode style configurationsand run code cleanup.
Document Health Indicator
Find All References and CodeLens Razor support
Find All Reference (Shift-F12) and CodeLens now show results fromRazor(。cshtml文件在网络核心项目)。然后你可以在相关的剃刀文件的识别码导航。
codelens现在显示Razor(。cshtml)结果。
剃刀结果查找所有引用。
从解决方案资源管理器中运行测试
现在你可以右键点击测试,测试类,或在运行或调试测试解决方案资源管理器中的测试项目。
右键单击运行测试从“解决方案资源管理器。
一如既往,谢谢你尝试预览,给开发者社区的反馈,并利用 报告问题 工具Visual Studio。Read more or watch a video on other Visual Studio 2019 Preview 1 features in theblog post。