{"id":244644,"date":"2023-08-21T08:00:38","date_gmt":"2023-08-21T15:00:38","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=244644"},"modified":"2023-08-21T09:03:38","modified_gmt":"2023-08-21T16:03:38","slug":"new-in-visual-studio-compare-files-with-solution-explorer","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/new-in-visual-studio-compare-files-with-solution-explorer\/","title":{"rendered":"New in Visual Studio: Compare Files with Solution Explorer"},"content":{"rendered":"<p>Comparing code in different files is a common need for developers, yet it often disrupts the flow of your work. We&#8217;ve heard <a href=\"https:\/\/developercommunity.visualstudio.com\/t\/is-there-a-way-to-compare-two-files-from-solution\/619706\">your feedback<\/a> and are excited to introduce a new compare feature in Visual Studio. This feature enables you to compare code files directly within the Solution Explorer, eliminating the need for external tools and keeping you in your developer flow.<\/p>\n<figure style=\"text-align: center;\"><iframe src=\"\/\/www.youtube.com\/embed\/RgSjCK64fhE\" width=\"560\" height=\"314\" allowfullscreen=\"allowfullscreen\"><span data-mce-type=\"bookmark\" style=\"display: inline-block; width: 0px; overflow: hidden; line-height: 0;\" class=\"mce_SELRES_start\">\ufeff<\/span><\/iframe><\/figure>\n<h2>Effortless Code Comparison with Two Options<\/h2>\n<p>Recognizing that developers have different scenarios for comparing files, we&#8217;ve introduced two convenient ways to achieve the same goal: effortless code comparison to understand differences.<\/p>\n<h3>1. Compare Selected Context Menu<\/h3>\n<p>We&#8217;re introducing the &#8220;Compare Selected&#8221; context menu option, designed to simplify multi-file comparison. Hold down the Ctrl key and select two files in the Solution Explorer that you want to compare. After selecting the files, right-click and choose &#8220;Compare Selected&#8221; from the context menu. Visual Studio will instantly display a side-by-side comparison view, highlighting differences between the chosen files.<\/p>\n<p><img decoding=\"async\" width=\"1430\" height=\"545\" class=\"wp-image-244645\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/visual-studio-screenshot-with-two-files-selected-a.png\" alt=\"Visual Studio screenshot with two files selected and the &quot;Compare Selected&quot; selected. Then a screenshot of the compare of the two files. \" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/visual-studio-screenshot-with-two-files-selected-a.png 1430w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/visual-studio-screenshot-with-two-files-selected-a-300x114.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/visual-studio-screenshot-with-two-files-selected-a-1024x390.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/visual-studio-screenshot-with-two-files-selected-a-768x293.png 768w\" sizes=\"(max-width: 1430px) 100vw, 1430px\" \/><\/p>\n<h3>2. Compare with&#8230; Context Menu<\/h3>\n<p>Our second option, the &#8220;Compare with&#8230;&#8221; context menu, provides a straightforward method to compare a file in your solution with an external file on your disk. Right-click on the file you wish to compare within the Solution Explorer, then select &#8220;Compare With\u2026&#8221;. This action opens a File Explorer window, enabling you to navigate to any file on your disk and initiate the comparison process.<\/p>\n<p><img decoding=\"async\" width=\"1426\" height=\"613\" class=\"wp-image-244646\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/word-image-244644-2.png\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/word-image-244644-2.png 1426w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/word-image-244644-2-300x129.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/word-image-244644-2-1024x440.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2023\/08\/word-image-244644-2-768x330.png 768w\" sizes=\"(max-width: 1426px) 100vw, 1426px\" \/><\/p>\n<h2>Let us know what you think!<\/h2>\n<p>We&#8217;re interested in learning about your experiences with the new compare feature and how it&#8217;s influencing your development workflow. If you have suggestions, comments, or insights, please don&#8217;t hesitate to share them with us at this <a href=\"https:\/\/www.research.net\/r\/comparefilesblog\">link<\/a>.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Comparing code in different files is a common need for developers, yet it often disrupts the flow of your work. We&#8217;ve heard your feedback and are excited to introduce a new compare feature in Visual Studio. This feature enables you to compare code files directly within the Solution Explorer, eliminating the need for external tools [&hellip;]<\/p>\n","protected":false},"author":99106,"featured_media":244650,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[155],"tags":[6914,6879,526,6815],"class_list":["post-244644","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio","tag-compare","tag-editor","tag-productivity","tag-visual-studio-2022"],"acf":[],"blog_post_summary":"<p>Comparing code in different files is a common need for developers, yet it often disrupts the flow of your work. We&#8217;ve heard your feedback and are excited to introduce a new compare feature in Visual Studio. This feature enables you to compare code files directly within the Solution Explorer, eliminating the need for external tools [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/244644","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\/99106"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=244644"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/244644\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/244650"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=244644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=244644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=244644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}