{"id":22443,"date":"2019-04-02T12:00:17","date_gmt":"2019-04-02T19:00:17","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/dotnet\/?p=22443"},"modified":"2021-09-29T11:54:45","modified_gmt":"2021-09-29T18:54:45","slug":"visual-studio-2019-net-productivity-2","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/visual-studio-2019-net-productivity-2\/","title":{"rendered":"Visual Studio 2019 .NET productivity"},"content":{"rendered":"<p>Your friendly neighborhood .NET productivity team (aka. Roslyn) focuses a lot on improving the .NET coding experience. Sometimes it\u2019s the little refactorings and code fixes that really improve your workflow. You may have seen many <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/visual-studio-2019-net-productivity\/\">improvements in the previews<\/a>, but for all of you who were eagerly awaiting the GA release here\u2019s a few features you may enjoy!<\/p>\n<h2>Tooling improvements<\/h2>\n<p>I\u2019m most excited about the new Roslyn classification colors. Visual Studio Code colors received high praise so we incorporated similar color schemes into Visual Studio. Your code editor is now just a little more colorful. Key words, user methods, local variables, parameter names, and overloaded operators all get new colors. You can even customize the colors for each syntax classifications in <strong>Tools &gt; Options &gt; Environment &gt; Fonts and Colors <\/strong>and scroll to \u2018User Members\u2019.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-22462 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/NewColors-1024x742.png\" alt=\"New roslyn classification colors\" width=\"459\" height=\"333\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/NewColors-1024x742.png 1024w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/NewColors-300x217.png 300w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/NewColors-768x557.png 768w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/NewColors.png 1228w\" sizes=\"(max-width: 459px) 100vw, 459px\" \/><\/p>\n<p>At the bottom of files in your editor are the document health indicators as well as our code cleanup icon. The document health indicators let you know at a glance how many errors and warnings are present in the file you currently have open. You can click on the code cleanup icon to apply code style rules specified in <strong>Tools &gt; Options<\/strong> or, if you have an <a href=\"https:\/\/docs.microsoft.com\/visualstudio\/ide\/create-portable-custom-editor-options\">editorconfig<\/a> file that shares one code style across your team, it will apply styles specified in that file.<\/p>\n<p><center>\n<div style=\"width: 1392px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-22443-1\" width=\"1392\" height=\"664\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2019\/04\/DocHealthCodeCleanup.mp4?_=1\" \/><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2019\/04\/DocHealthCodeCleanup.mp4\">https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2019\/04\/DocHealthCodeCleanup.mp4<\/a><\/video><\/div>\n<\/center><\/p>\n<p>You can edit sdk-style project files with a simple double-click! You can also view these project files with preview in <a href=\"https:\/\/docs.microsoft.com\/visualstudio\/ide\/go-to\">GoToAll <\/a>(Ctrl+t) navigation and search the contents for file references.<\/p>\n<p><center>\n<div style=\"width: 1544px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-22443-2\" width=\"1544\" height=\"600\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2019\/04\/ProjectFileEditingAndCtrlT.mp4?_=2\" \/><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2019\/04\/ProjectFileEditingAndCtrlT.mp4\">https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2019\/04\/ProjectFileEditingAndCtrlT.mp4<\/a><\/video><\/div>\n<\/center><\/p>\n<p>Load a subset of projects in your solution with <a href=\"https:\/\/docs.microsoft.com\/visualstudio\/ide\/filtered-solutions\">filtered solutions<\/a>! You can now unload projects and save a .slnf file that will only open the projects you specified. This helps you get to the code you are interested in quickly without needing to load an entire solution.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-22450 size-large aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/SolutionFilter-1024x521.png\" alt=\"Open only a subset of projects in a solution with solution filters\" width=\"640\" height=\"326\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/SolutionFilter-1024x521.png 1024w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/SolutionFilter-300x152.png 300w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/SolutionFilter-768x390.png 768w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/SolutionFilter.png 1381w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>Find all references categorizes by reference type. You can filter by read\/write in the new \u2018Kind\u2019 column in the find all references window.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-22451 size-large aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/FAR_ReadWrite-1024x440.png\" alt=\"Filter references by Read\/Write with Find All References\" width=\"640\" height=\"275\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/FAR_ReadWrite-1024x440.png 1024w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/FAR_ReadWrite-300x129.png 300w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/FAR_ReadWrite-768x330.png 768w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/FAR_ReadWrite.png 1582w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>Run code style formatting over the entire solution at the command-line with the `<a href=\"https:\/\/github.com\/dotnet\/format\">dotnet format<\/a>` global tool.<\/p>\n<p><center>\n<div style=\"width: 1916px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-22443-3\" width=\"1916\" height=\"800\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/DotnetFormatDiag.mp4?_=3\" \/><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/DotnetFormatDiag.mp4\">https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/DotnetFormatDiag.mp4<\/a><\/video><\/div>\n<\/center>\n<a href=\"http:\/\/aka.ms\/intellicode\">Intellicode<\/a> is an extension offering smarter intellisense completion with machine-learning trained models run over 2,000 open source .NET repositories on GitHub.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-22454 size-large aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/Intellicode-1024x554.png\" alt=\"Intellicode offers smarter suggestions based on your scenario\" width=\"640\" height=\"346\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/Intellicode-1024x554.png 1024w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/Intellicode-300x162.png 300w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/Intellicode-768x416.png 768w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/Intellicode.png 1594w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/p>\n<h2><\/h2>\n<h2>Now the omnibus of new code fixes and refactorings!<\/h2>\n<p>&nbsp;<\/p>\n<h5><\/h5>\n<h5>Foreach to LINQ<\/h5>\n<p><center>\n<div style=\"width: 1168px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-22443-4\" width=\"1168\" height=\"846\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/ToLinqQuery.mp4?_=4\" \/><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/ToLinqQuery.mp4\">https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/ToLinqQuery.mp4<\/a><\/video><\/div>\n<\/center>\n&nbsp;<\/p>\n<h5><\/h5>\n<h5>Add missing reference for unimported types<\/h5>\n<p><center>\n<div style=\"width: 762px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-22443-5\" width=\"762\" height=\"658\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/AddUsings.mp4?_=5\" \/><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/AddUsings.mp4\">https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/AddUsings.mp4<\/a><\/video><\/div>\n<\/center>\n&nbsp;<\/p>\n<h5><\/h5>\n<h5>Sync namespace and folder name<\/h5>\n<p><center>\n<div style=\"width: 1522px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-22443-6\" width=\"1522\" height=\"964\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/SyncNamespaceAndFolderName.mp4?_=6\" \/><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/SyncNamespaceAndFolderName.mp4\">https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/SyncNamespaceAndFolderName.mp4<\/a><\/video><\/div>\n<\/center>\n&nbsp;<\/p>\n<h5><\/h5>\n<h5>Invert conditional expressions<\/h5>\n<p><center>\n<div style=\"width: 1428px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-22443-7\" width=\"1428\" height=\"390\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/InvertConditional.mp4?_=7\" \/><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/InvertConditional.mp4\">https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/InvertConditional.mp4<\/a><\/video><\/div>\n<\/center>\n&nbsp;<\/p>\n<h5><\/h5>\n<h5>Pull members up dialog for promoting members to an interface<\/h5>\n<p><center>\n<div style=\"width: 1168px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-22443-8\" width=\"1168\" height=\"904\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/PullMemberUp.mp4?_=8\" \/><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/PullMemberUp.mp4\">https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/PullMemberUp.mp4<\/a><\/video><\/div>\n<\/center>\n&nbsp;<\/p>\n<h5><\/h5>\n<h5>Wrap\/indent\/align parameters\/arguments<\/h5>\n<p><center>\n<div style=\"width: 1866px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-22443-9\" width=\"1866\" height=\"790\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/WrapParameter.mp4?_=9\" \/><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/WrapParameter.mp4\">https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/WrapParameter.mp4<\/a><\/video><\/div>\n<\/center>\n&nbsp;<\/p>\n<h5><\/h5>\n<h5>Remove unused expression values and parameters<\/h5>\n<p><center>\n<div style=\"width: 1892px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-22443-10\" width=\"1892\" height=\"620\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/RemoveUnused.mp4?_=10\" \/><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/RemoveUnused.mp4\">https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2020\/04\/RemoveUnused.mp4<\/a><\/video><\/div>\n<\/center>\n&nbsp;<\/p>\n<p>This is a set of highlights of what\u2019s new in Visual Studio 2019, for a complete list see the <a href=\"https:\/\/docs.microsoft.com\/en-us\/visualstudio\/releases\/2019\/release-notes\">release notes<\/a>. As always, I would love your feedback via <a href=\"https:\/\/twitter.com\/VisualStudio\">twitter<\/a>, on <a href=\"https:\/\/github.com\/dotnet\/roslyn\/issues\">GitHub<\/a>, or in the comments section below. Also, one important thing to note is that to use .NET Core 3.0 Preview you will need to <a href=\"https:\/\/dotnet.microsoft.com\/download\/dotnet-core\/3.0\">download and install<\/a> the SDK, it is not included with the Visual Studio 2019 installer yet.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Your friendly neighborhood .NET productivity team (aka. Roslyn) focuses a lot on improving the .NET coding experience. Sometimes it\u2019s the little refactorings and code fixes that really improve your workflow. You may have seen many improvements in the previews, but for all of you who were eagerly awaiting the GA release here\u2019s a few features [&hellip;]<\/p>\n","protected":false},"author":355,"featured_media":58792,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[685,756,646],"tags":[4,311,2023,316,147],"class_list":["post-22443","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet","category-csharp","category-visual-studio","tag-net","tag-code-fixes","tag-productivity","tag-refactoring","tag-visual-studio"],"acf":[],"blog_post_summary":"<p>Your friendly neighborhood .NET productivity team (aka. Roslyn) focuses a lot on improving the .NET coding experience. Sometimes it\u2019s the little refactorings and code fixes that really improve your workflow. You may have seen many improvements in the previews, but for all of you who were eagerly awaiting the GA release here\u2019s a few features [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/22443","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/355"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=22443"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/22443\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58792"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=22443"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=22443"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=22443"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}