{"id":230403,"date":"2020-08-25T12:13:23","date_gmt":"2020-08-25T19:13:23","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=230403"},"modified":"2020-08-25T16:06:09","modified_gmt":"2020-08-25T23:06:09","slug":"visual-studio-2019-v16-8-preview-2","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/visual-studio-2019-v16-8-preview-2\/","title":{"rendered":"Visual Studio 2019 v16.8 Preview 2 Releases New Features Today!"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>New features in Git Integration, .NET Productivity, Web Tools, and Xamarin are releasing in Visual Studio 2019 v16.8 Preview 2. Each of our teams continue to work hard to delight our developers. For this reason, Preview releases are some of the most exciting for us as we wait to hear how our newest features impact your work.<\/p>\n<p>From my perspective, one of the greatest aspects of shipping releases is how engaged you are in the improvement of our products. If you have any suggestions or run into any challenges using these features, please visit our <a href=\"https:\/\/developercommunity.visualstudio.com\/\">Developer Community<\/a> to let us hear your perspective. If you want greater details of what\u2019s in this release, please see our <a href=\"https:\/\/docs.microsoft.com\/visualstudio\/releases\/2019\/release-notes-preview\">release notes<\/a>.<\/p>\n<p><div  class=\"d-flex justify-content-center\"><a class=\"cta_button_link btn-primary mb-24\" href=\"https:\/\/visualstudio.microsoft.com\/vs\/preview\" target=\"_blank\">Install Visual Studio 2019<\/a><\/div><\/p>\n<h3>New Features in this Release<\/h3>\n<h4>Git Integration<\/h4>\n<p>Some repositories have more than one solution in them. Now when you open such a repository, the Solution Explorer will display a list of solutions for you to select. By default, folder view is always present at the top. This opens the root folder of the repository. Double clicking on a solution in this list will take you to that solution. Also, you can use the <strong>Switch Views button<\/strong> in the Solution Explorer toolbar to take you back to the list of views to easily move between solutions in your repository.<\/p>\n<p><figure id=\"attachment_230447\" aria-labelledby=\"figcaption_attachment_230447\" class=\"wp-caption aligncenter\" ><img decoding=\"async\" class=\"size-full wp-image-230447\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/08\/16.8_P2_listofviews-1.png\" alt=\"List of Views in Solutions Explorer\" width=\"692\" height=\"410\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/08\/16.8_P2_listofviews-1.png 692w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/08\/16.8_P2_listofviews-1-300x178.png 300w\" sizes=\"(max-width: 692px) 100vw, 692px\" \/><figcaption id=\"figcaption_attachment_230447\" class=\"wp-caption-text\">List of Views in Solutions Explorer in Visual Studio 2019 v16.8 Preview 2<\/figcaption><\/figure><\/p>\n<p>In the case you have only one solution in your repository, Visual Studio will load solution view by default. On the other hand, if you have no solutions in your repository, Visual Studio will open folder view by default. You can toggle this feature on\/off using its own <strong>Preview Feature<\/strong> checkbox in <strong>Tools | Options<\/strong>.<\/p>\n<p><figure id=\"attachment_230438\" aria-labelledby=\"figcaption_attachment_230438\" class=\"wp-caption aligncenter\" ><img decoding=\"async\" class=\"size-large wp-image-230438\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/08\/16.8_P2_viewpicker-1024x154.png\" alt=\"Toggle to show a list of views when opening a repository\" width=\"640\" height=\"96\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/08\/16.8_P2_viewpicker-1024x154.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/08\/16.8_P2_viewpicker-300x45.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/08\/16.8_P2_viewpicker-768x116.png 768w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/08\/16.8_P2_viewpicker-1536x232.png 1536w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/08\/16.8_P2_viewpicker.png 1604w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><figcaption id=\"figcaption_attachment_230438\" class=\"wp-caption-text\">Visual Studio 2019 v16.8 Preview 2 Toggle to Show a List of Views<\/figcaption><\/figure><\/p>\n<p>The new Git experiences are also coming to your Live Share experience. Now you can view the contents of the Git windows in read-only mode when you are a Guest in a Live Share session.<\/p>\n<p>We\u2019ve been listening to the feedback on the Git Repository window and have been making incremental tweaks. Also in this release, is\u00a0 the ability to single click to switch between branch histories while browsing through branches in your repo.<\/p>\n<h4>.NET Productivity<\/h4>\n<p>There are now C# and Visual Basic support for <a href=\"https:\/\/docs.microsoft.com\/en-us\/visualstudio\/ide\/reference\/options-text-editor-csharp-advanced?view=vs-2019#editor-help\">inline parameter name hints<\/a> that insert adornments for literals, casted literals, and object instantiations prior to each argument in function calls. In order to access this feature, you will need to turn this option on in <strong>Tools<\/strong> &gt; <strong>Options<\/strong> &gt; <strong>Text Editor<\/strong> &gt; <strong>C# <\/strong>or<strong> Basic<\/strong> &gt; <strong>Advanced<\/strong> and select <strong>Display inline parameter name hints (experimental)<\/strong>. The inline parameter name hints will then appear in C# or Visual Basic file.<\/p>\n<p><figure id=\"attachment_230411\" aria-labelledby=\"figcaption_attachment_230411\" class=\"wp-caption aligncenter\" ><img decoding=\"async\" class=\"size-full wp-image-230411\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/08\/16.8P2_InlineParameterNameHints.png\" alt=\"Inline parameter name hints\" width=\"478\" height=\"142\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/08\/16.8P2_InlineParameterNameHints.png 478w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/08\/16.8P2_InlineParameterNameHints-300x89.png 300w\" sizes=\"(max-width: 478px) 100vw, 478px\" \/><figcaption id=\"figcaption_attachment_230411\" class=\"wp-caption-text\">Inline Parameter Name Hints in Visual Studio 2019 v16.8 Preview 2<\/figcaption><\/figure><\/p>\n<p>In addition, you can now extract members from a selected class to a new base class with the new <strong>Extract Base Class <\/strong>refactoring. To give this a try, place your cursor on either the class name or a highlighted member. Press (<strong>Ctrl<\/strong>+<strong>.<\/strong>) to trigger the <strong>Quick Actions and Refactorings<\/strong> menu. From there, select <strong>Pull member(s) up to new base class<\/strong>. The new <strong>Extract Base Class<\/strong> dialog will open where you can specify the name for the base class and the location of where it should be placed. You can select the members you want to transfer to the new base class and choose to make the members abstract by selecting the checkbox in the <strong>Make abstract<\/strong> column.<\/p>\n<p><figure id=\"attachment_230408\" aria-labelledby=\"figcaption_attachment_230408\" class=\"wp-caption aligncenter\" ><img decoding=\"async\" class=\"size-full wp-image-230408\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/08\/16.8_P2MakeAbstract.png\" alt=\"Extract Base Class Refactoring\" width=\"987\" height=\"979\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/08\/16.8_P2MakeAbstract.png 987w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/08\/16.8_P2MakeAbstract-300x298.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/08\/16.8_P2MakeAbstract-150x150.png 150w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/08\/16.8_P2MakeAbstract-768x762.png 768w\" sizes=\"(max-width: 987px) 100vw, 987px\" \/><figcaption id=\"figcaption_attachment_230408\" class=\"wp-caption-text\">Extract Base Class Refactoring in Visual Studio 2019 v16.8 Preview 2<\/figcaption><\/figure><\/p>\n<p>&nbsp;<\/p>\n<p>Once you select <strong>Ok<\/strong> you will see the new base class added along with its members.<\/p>\n<p>Another feature is a code fix to convert instances of <em>typeof<\/em> in C# and <em>GetType<\/em> in Visual Basic. Using <em>nameof<\/em> instead of the name of the type avoids the reflections involved when retrieving an object. As shown below, place your cursor within the <em>typeof(&lt;QualifiedType&gt;).Name<\/em>. Press <strong>(Ctrl+.)<\/strong> to trigger the <strong>Quick Actions and Refactorings<\/strong> menu. Next, select from one of the following options:<\/p>\n<p>For C#, select <strong>Convert `typeof` to `nameof`:<\/strong><\/p>\n<p><figure id=\"attachment_230407\" aria-labelledby=\"figcaption_attachment_230407\" class=\"wp-caption aligncenter\" ><img decoding=\"async\" class=\"size-full wp-image-230407\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/08\/16.8_P2ConvertTypeOf1.png\" alt=\"Convert typeof to nameof\" width=\"802\" height=\"297\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/08\/16.8_P2ConvertTypeOf1.png 802w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/08\/16.8_P2ConvertTypeOf1-300x111.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/08\/16.8_P2ConvertTypeOf1-768x284.png 768w\" sizes=\"(max-width: 802px) 100vw, 802px\" \/><figcaption id=\"figcaption_attachment_230407\" class=\"wp-caption-text\">Convert typeof to nameof in Visual Studio 2019 v16.8 Preview 2<\/figcaption><\/figure><\/p>\n<p>For Visual Basic, select<strong> Convert `GetType` to `NameOf`:<\/strong><\/p>\n<p><figure id=\"attachment_230406\" aria-labelledby=\"figcaption_attachment_230406\" class=\"wp-caption aligncenter\" ><img decoding=\"async\" class=\"size-full wp-image-230406\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/08\/16.8_P2ConvertGetType.png\" alt=\"Convert 'GetType' to 'NameOf'\" width=\"764\" height=\"303\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/08\/16.8_P2ConvertGetType.png 764w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/08\/16.8_P2ConvertGetType-300x119.png 300w\" sizes=\"(max-width: 764px) 100vw, 764px\" \/><figcaption id=\"figcaption_attachment_230406\" class=\"wp-caption-text\">Convert &#8216;GetType&#8217; to &#8216;NameOf&#8217; in Visual Studio 2019 v16.8 Preview 2<\/figcaption><\/figure><\/p>\n<h4>WPF, UWP, and Xamarin.Forms Tooling<\/h4>\n<p>In this release we\u2019ve worked to make additional improvements to XAML Hot Reload experiences, changes include:<\/p>\n<p>Also, in this release we begin to rollout support for a <a href=\"https:\/\/developercommunity.visualstudio.com\/content\/idea\/661682\/xaml-hot-reload-for-xamarinforms-on-uwp.html\">highly requested feature<\/a>.\u00a0<strong>Forms \u201cchanges only\u201d XAML Hot Reload now supports UWP<\/strong>. This enables the new changes only XAML Hot Reload support in Xamarin.Forms Projects when targeting UWP. Please note this feature is still in development. While editing XAML will now trigger updates in the running app, other features such as in-app toolbar (element selection, etc.) are not yet fully implemented and can have unpredictable behavior.<\/p>\n<p>As part of a bigger effort that will be completed across multiple 16.8 Preview release comes <strong>XAML Hot Reload Settings moved to \u201cDebugging &gt; Hot Reload\u201d<\/strong>. We\u2019re starting to consolidate the XAML Hot Reload settings across WPF, UWP and eventually Xamarin.Forms into a unified settings location. In this release we\u2019ve started this process by moving the existing desktop settings out of the Debugging &gt; General &gt; Enable UI Debugging Tools for XAML and into a new location under <strong>Debugging &gt; Hot Reload<\/strong>. No settings will be changed during this migration so all your existing choices will continue to stay in effect. Also, for the first time ever we\u2019re enabling the ability to disable\/enable XAML Hot Reload support per-platform, meaning you can disable these experiences for WPF, UWP or both.<\/p>\n<h3>Give Visual Studio 2019 v16.8 a Try Today!<\/h3>\n<p>We hope you are as excited about these features as our teams. We are also continually working towards more product stability and performance improvements. Please let us know how we are doing, and we hope you have a productive day using Visual Studio 2019.<\/p>\n<p><div  class=\"d-flex justify-content-center\"><a class=\"cta_button_link btn-primary mb-24\" href=\"https:\/\/visualstudio.microsoft.com\/vs\/preview\" target=\"_blank\">Install Visual Studio 2019<\/a><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>New features in Git Integration, .NET Productivity, Web Tools, and Xamarin are releasing in Visual Studio 2019 v16.8 Preview 2. Each of our teams continue to work hard to delight our developers. For this reason, Preview releases are some of the most exciting for us as we wait to hear how our newest features impact your work.<\/p>\n","protected":false},"author":4513,"featured_media":255385,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[155],"tags":[237,354,4381,475,133],"class_list":["post-230403","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio","tag-net","tag-announcement","tag-github","tag-visual-studio-2019","tag-xaml"],"acf":[],"blog_post_summary":"<p>New features in Git Integration, .NET Productivity, Web Tools, and Xamarin are releasing in Visual Studio 2019 v16.8 Preview 2. Each of our teams continue to work hard to delight our developers. For this reason, Preview releases are some of the most exciting for us as we wait to hear how our newest features impact your work.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/230403","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\/4513"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=230403"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/230403\/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=230403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=230403"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=230403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}