{"id":15356,"date":"2017-11-20T10:00:19","date_gmt":"2017-11-20T18:00:19","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudio\/?p=15356"},"modified":"2019-03-18T23:00:51","modified_gmt":"2019-03-19T06:00:51","slug":"overview-of-visual-studio-2017-updates-for-net-developers","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/overview-of-visual-studio-2017-updates-for-net-developers\/","title":{"rendered":"Overview of Visual Studio 2017 and Updates for .NET Developers"},"content":{"rendered":"<p>Visual Studio 2017 first released in March of this year. Since then, there have been five updates with each bringing more improvements and capabilities. Every improvement is geared towards making you more productive and this post aims to give you an overview of the culmination of features to date. Read on to see how you can get started working on your projects quickly and write better code faster.<\/p>\n<p>Download <a href=\"http:\/\/visualstudio.com\/vs\/preview\/\">Visual Studio 2017 Preview<\/a>\u00a0today.<\/p>\n<h2>New Install Experience, Performance and Reliability<\/h2>\n<p>The first thing you\u2019ll notice with Visual Studio 2017 is the new install experience which lets you pick and choose which development tools you want installed. To help you get started working on your projects quickly, Visual Studio 2017 Preview version 15.5 has <a target=\"_blank\" href=\"https:\/\/blogs.msdn.microsoft.com\/visualstudio\/2017\/11\/20\/large-c-and-vb-solutions-load-significantly-faster-in-15-5-update\/\" rel=\"noopener\">parallelized initialization to make your solutions load fast<\/a> and get you to writing code as soon as possible. Other performance improvements include moving computation &#8211;like code analysis\u2014out of the main Visual Studio process to keep your typing speed unimpeded.<\/p>\n<h2>Smart Code Editor<\/h2>\n<p>Visual Studio has a deep understanding of your code via the Roslyn compiler to provide you with <a href=\"https:\/\/docs.microsoft.com\/en-us\/visualstudio\/ide\/writing-code-in-the-code-and-text-editor\">smart editing features<\/a> like syntax colorization, code completion, completion list filtering, spell-checking mistyped variables, unimported type resolution, outlining, structure visualizers, <a href=\"https:\/\/docs.microsoft.com\/en-us\/visualstudio\/ide\/find-code-changes-and-other-history-with-codelens\">CodeLens<\/a>, call hierarchy, hover-able quick info, parameter help, as well as tools for refactoring, applying quick actions, and generating code. The latest update to Visual Studio 2017 includes smart variable naming suggestions and expand\/contract selection (<i>Ctrl+W<\/i>\/<i>Ctrl+Shift+W<\/i> in Default Profile, <i>Shift+Alt+=<\/i>\/<i>Shift+Alt+-<\/i> in C# Profile).<\/p>\n<p><a target=\"_blank\" href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/Smart-Code-Editor.png\" rel=\"noopener\"><img decoding=\"async\" title=\"Smart Code Editor\" alt=\"Smart Code Editor\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2017\/11\/Smart-Code-Editor.png\" width=\"515\" height=\"130\" class=\"\" \/><\/a><\/p>\n<p><script src=\"https:\/\/gist.github.com\/kuhlenh\/4d85c9a58f9f15e3f8c19bc35d34051e.js\"><\/script><\/p>\n<p><strong>Pro Tips:<\/strong><\/p>\n<ul>\n<li>Use <i>Quick Launch<\/i> (<i>Ctrl+Q<\/i>) to search all Visual Studio settings.<\/li>\n<\/ul>\n<h2>Navigate Your Codebase<\/h2>\n<p><a href=\"https:\/\/docs.microsoft.com\/en-us\/visualstudio\/ide\/navigating-code\">Quickly navigate your .NET code<\/a> by jumping to any file, type, member, or symbol declaration with the redesigned <i>Go To All<\/i> shortcut (<i>Ctrl+T<\/i> or <i>Ctrl+,<\/i>). Find all the references of a symbol or literal in your code, including references across .NET languages, and use the redesigned results window to organize your references by definition, project, and\/or path (<i>Shift+F12<\/i>). And don\u2019t forget to try targeted navigation commands to help you jump directly to symbol definitions (<i>F12, or now also Ctrl+click<\/i>) or implementations (<i>Ctrl+F12<\/i>).<\/p>\n<p><a target=\"_blank\" href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/Navigate-Your-Code.png\" rel=\"noopener\"><img decoding=\"async\" title=\"Navigate Your Code\" alt=\"Navigate Your Code\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2017\/11\/Navigate-Your-Code.png\" width=\"518\" height=\"449\" class=\"\" \/><\/a><\/p>\n<p><strong>Pro tips:<\/strong><\/p>\n<ul>\n<li>Use \u201cf\u201d, \u201ct\u201d, \u201cm\u201d, and \u201c#\u201d as prefixes in your Go To All (<i>Ctrl+T<\/i>) search to filter results down to files, types, members, or symbols respectively.<\/li>\n<li>Use the gear icon in the Go To All dialog to move its position from the right-hand corner of the code editor to the middle.<\/li>\n<li>Use the \u201clock\u201d icon in the Find All References (<i>Shift+F12<\/i>) window to save your search. Subsequent Find All Reference calls will open a new results tab.<\/li>\n<\/ul>\n<h2>Live Code Analysis<\/h2>\n<p>Visual Studio has <a href=\"https:\/\/docs.microsoft.com\/en-us\/visualstudio\/ide\/refactoring-code-generation-quick-actions\">live code <\/a>analyzers to help you improve your code quality by detecting errors and potentially problematic code. We provide quick-actions (<i>Ctrl+.<\/i>) to resolve detected problems across your document, project, or solution. Also invoke the <i>Ctrl+.<\/i> shortcut to access code suggestions (marked by faded gray dots under the first characters of an expression), learn best practices, stub or generate code, refactor code, and adopt new language features.<\/p>\n<p>Learn more about available quick actions and refactorings in <a href=\"https:\/\/docs.microsoft.com\/en-us\/visualstudio\/ide\/refactoring-code-generation-quick-actions\">our documentation<\/a>. Some of the ones added in the latest Visual Studio 2017 update are: sort modifiers, move declaration near reference, convert lambda to C# 7.0 local function, fade and remove unreachable code, add missing file banner, use C# 7.0 pattern matching, simplify with C# 7.1 inferred tuple name, and more.<\/p>\n<p><a target=\"_blank\" href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/Live-Code-Analysis.png\" rel=\"noopener\"><img decoding=\"async\" title=\"Live Code Analysis\" alt=\"Live Code Analysis\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2017\/11\/Live-Code-Analysis.png\" width=\"768\" height=\"243\" class=\"\" \/><\/a><\/p>\n<p><strong>Pro tips:<\/strong><\/p>\n<ul>\n<li>Enable full-solution analysis to find issues across your entire solution even if you don\u2019t have those files open in the editor: <i>Tools &gt; Options &gt; Text Editor &gt; [C# \/ Basic] &gt; Advanced &gt; Enable full solution analysis<\/i>.<\/li>\n<li>Errors, warnings, and suggestions appear in the editor scroll bar to give you visuals into where errors are in your open file.<\/li>\n<li>Code issues can be suppressed individually using the <i>Ctrl+.<\/i> shortcut or in-bulk by selecting the issues in the Error list and right-click &gt; <i>Suppress<\/i>.<\/li>\n<li>Have Visual Studio offer to install NuGet packages and add references to unimported types by going to <i>Tools &gt; Options &gt; Text Editor &gt; [C# \/ Basic] &gt; Advanced &gt; Add using for types in NuGet\/reference assemblies<\/i>.<\/li>\n<li>Some code refactorings requires code snippet selections, like <i>Extract Method<\/i> and <i>Introduce Local Variable<\/i>.<\/li>\n<li>For more code diagnostics and fixes related to best practices, API design, and performance improvements, install our <i>Microsoft Code Analysis 2017<\/i> extension.<\/li>\n<\/ul>\n<h2>Code Consistency and Maintenance<\/h2>\n<p>Visual Studio 2017 enables coding convention configuration, detects coding style violations, and provides quick-fixes to remedy style issues with the <i>Ctrl+.<\/i> shortcut. Configure and enforce your team\u2019s formatting, naming, and code style conventions across a repository\u2014allowing overriding values at the project and file level\u2014using <a href=\"https:\/\/docs.microsoft.com\/en-us\/visualstudio\/ide\/editorconfig-code-style-settings-reference\">EditorConfig<\/a>. For any given file, the EditorConfig file in the closest containing folder will be enforced.<\/p>\n<p><a target=\"_blank\" href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/Code-Consistency-and-Maintenance.png\" rel=\"noopener\"><img decoding=\"async\" title=\"Code Consistency and Maintenance\" alt=\"Code Consistency and Maintenance\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2017\/11\/Code-Consistency-and-Maintenance.png\" width=\"529\" height=\"250\" class=\"\" \/><\/a><\/p>\n<p><strong>Pro Tips:<\/strong><\/p>\n<ul>\n<li>Configure settings for your machine in <i>Tools &gt; Options &gt; Text Editor &gt; [C# \/ Basic] &gt; Code Style<\/i>. Override these settings in your repository with an EditorConfig file.<\/li>\n<li>Grab an example .editorconfig file from the corefx repository, <a href=\"https:\/\/github.com\/dotnet\/corefx\">https:\/\/github.com\/dotnet\/corefx<\/a>.<\/li>\n<li>Use <i>Format Document<\/i> (<i>Ctrl+K,D<\/i> or <i>Ctrl+E,D<\/i>) to clean up formatting violations based on the configuration in your .editorconfig file or in the absence of that, Tools&gt;Options settings.<\/li>\n<\/ul>\n<h2>Unit Testing<\/h2>\n<p><a href=\"https:\/\/docs.microsoft.com\/en-us\/visualstudio\/test\/improve-code-quality\">Run and debug your unit tests<\/a> based on the MSTest, NUnit, or XUnit testing frameworks for any application targeting .NET Framework, .NET Standard, or .NET Core. Explore and review your tests in the <i>Test Explorer<\/i> or immediately see how code changes impact your unit tests inside the editor with <i>Live Unit Testing <\/i>(Enterprise SKU only).<\/p>\n<p><a target=\"_blank\" href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/Unit-Testing.png\" rel=\"noopener\"><img decoding=\"async\" title=\"Unit Testing\" alt=\"Unit Testing\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2017\/11\/Unit-Testing.png\" \/><\/a><\/p>\n<p><strong>Pro Tips:<\/strong><\/p>\n<ul>\n<li>Use Live Unit Testing with MSTestv1 in the latest Visual Studio 2017 update.<\/li>\n<li>Include or exclude test projects, or even specific tests, from the set of unit tests run \u201clive\u201d by right-clicking on the test project in Solution Explorer (or on the test itself) and selecting <i>Live Unit Testing &gt; [Include \/ Exclude]<\/i>.<\/li>\n<li>Enable fast test discovery in the Test Explorer with the experimental feature, <a href=\"https:\/\/blogs.msdn.microsoft.com\/dotnet\/2017\/10\/30\/real-time-test-discovery\">Real-Time Test Discovery<\/a>.<\/li>\n<\/ul>\n<h2>Debugging<\/h2>\n<p>Visual Studio 2017 improves upon it\u2019s <a href=\"https:\/\/docs.microsoft.com\/en-us\/visualstudio\/debugger\/\">top-notch debugger<\/a> to allow you to debug your .NET applications targeting the .NET Framework, .NET Standard, and .NET Core. New features in 2017 include the ability to reattach to processes in one click, visibility into which expression returns null with the new <i>Exception Helper<\/i>, <i>Run to Click<\/i>, and the ability to <i>Step Back<\/i> with <i>IntelliTrace<\/i> (Enterprise SKU only).<\/p>\n<p>If your service runs in Azure, use <i>Snapshot debugging<\/i> to diagnose issues on your live, deployed cloud applications in Visual Studio 2017 Enterprise.<\/p>\n<p><a target=\"_blank\" href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/4\/2019\/06\/Debugging.png\" rel=\"noopener\"><img decoding=\"async\" title=\"Debugging\" alt=\"Debugging\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2017\/11\/Debugging.png\" width=\"848\" height=\"192\" class=\"\" \/><\/a><\/p>\n<p><strong>Pro Tips:<\/strong><\/p>\n<ul>\n<li>Hold the <i>CTRL<\/i> button to transform <i>Run to Click<\/i> into <i>Set Next Statement<\/i>.<\/li>\n<li>Take a look at the checkbox options in the new <i>Exception Helper<\/i>, you will find that you can ignore breaking on exceptions thrown from specific libraries.<\/li>\n<li>Open the <i>Diagnostic Tools<\/i> window while debugging and notice a new summary page that allows you to take snapshots, enable CPU profiling, and view Exception events.<\/li>\n<li>Right-click and use <i>Step Into Specific<\/i> to choose which nested function you want to \u201cstep into\u201d in the given line of code.<\/li>\n<\/ul>\n<h2>.NET Core-Specific Features<\/h2>\n<p>Projects targeting .NET Core and .NET Standard involve the new, <a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/core\/tools\/csproj\">lightweight project features<\/a> in Visual Studio 2017. These include file globbing support, a smaller .csproj file\u2014meaning fewer merge conflicts\u2014and the ability to directly edit the new .csproj file without having to unload and reload a project.<\/p>\n<p><strong>Pro Tip:<\/strong><\/p>\n<ul>\n<li>Add NuGet packages directly to your project by adding the tag: &lt;PackageReference Include=\u201d&lt;PACKAGE_NAME&#8221; Version=&#8221;PACKAGE_VERSION&#8221; \/&gt;<\/li>\n<\/ul>\n<h2>Modern C# and Visual Basic<\/h2>\n<p>Visual Studio 2017 ships with <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/whats-new-in-csharp-7-0\/\">C# 7.0<\/a> and <a href=\"https:\/\/blogs.msdn.microsoft.com\/vbteam\/2017\/03\/30\/whats-new-in-visual-basic-2017\/\">Visual Basic 15<\/a>, version 15.3 ships with <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/welcome-to-c-7-1\/\">C# 7.1<\/a>, and the latest release ships with <a href=\"https:\/\/blogs.msdn.microsoft.com\/dotnet\/2017\/11\/15\/welcome-to-c-7-2-and-span\/\">C# 7.2<\/a>. By default, Visual Studio projects support the latest <i>major<\/i> version of the language (in this case, C# 7.0 and VB 15) with options to allow only older language features or to embrace new language features at the minor version cadence. Notable new lan<a><\/a>guage features, include:<\/p>\n<ul>\n<li>C# 7.0 : tuples, pattern-matching, local functions, and out var<\/li>\n<li>C# 7.1 : async Main, support, inferred tuple element names, and default literals<\/li>\n<li>C# 7.2 : Span&lt;T&gt;, non-trailing named arguments, private protected, readonly structs, and in parameters<\/li>\n<li>Visual Basic 15 brings tuples and digit separators<\/li>\n<\/ul>\n<p>Follow the C# and Visual Basic language design discussion on the <a href=\"https:\/\/github.com\/dotnet\/csharplang\">csharplang<\/a> and <a href=\"https:\/\/github.com\/dotnet\/vblang\">vblang<\/a> GitHub repositories.<\/p>\n<p><strong>Pro Tips:<\/strong><\/p>\n<ul>\n<li>Change your language adoption cadence by right-clicking your project in <i>Solution Explorer and selecting Properties &gt; Build &gt; Advanced &gt; Language version.<\/i> If you use a language feature that is not supported by your project\u2019s language version, you can use the shortcut <i>Ctrl+.<\/i> to upgrade your project language from within the editor.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>Try out <a href=\"http:\/\/visualstudio.com\/vs\/preview\/\">Visual Studio 2017 Preview<\/a> today to enhance your workflow with productivity features and enhancements. Share the Pro-tips outlined in this article with your teammates and let us know if something is blocking your productivity by <a href=\"https:\/\/docs.microsoft.com\/en-us\/visualstudio\/ide\/how-to-report-a-problem-with-visual-studio-2017\">reporting a problem<\/a> in Visual Studio. Happy coding!<\/p>\n<p>Over \u2018n\u2019 out,<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Visual Studio 2017 first released in March of this year. Since then, there have been five updates with each bringing more improvements and capabilities. Every improvement is geared towards making you more productive and this post aims to give you an overview of the culmination of features to date. Read on to see how you [&hellip;]<\/p>\n","protected":false},"author":586,"featured_media":255385,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1085,155],"tags":[237,242,5,9,653,156],"class_list":["post-15356","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloud","category-visual-studio","tag-net","tag-azure","tag-csharp","tag-debug","tag-visual-basic","tag-visual-studio-2017"],"acf":[],"blog_post_summary":"<p>Visual Studio 2017 first released in March of this year. Since then, there have been five updates with each bringing more improvements and capabilities. Every improvement is geared towards making you more productive and this post aims to give you an overview of the culmination of features to date. Read on to see how you [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/15356","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/users\/586"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=15356"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/15356\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/255385"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=15356"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=15356"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=15356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}