{"id":30732,"date":"2022-07-27T15:00:07","date_gmt":"2022-07-27T15:00:07","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cppblog\/?p=30732"},"modified":"2022-07-27T17:40:01","modified_gmt":"2022-07-27T17:40:01","slug":"msbuild-low-priority-builds-in-visual-studio","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/msbuild-low-priority-builds-in-visual-studio\/","title":{"rendered":"MSBuild Low Priority Builds in Visual Studio"},"content":{"rendered":"<p>The C++ team is happy to announce the completion of a highly upvoted <a href=\"https:\/\/developercommunity.visualstudio.com\/t\/Limit-CPU-usage-of-Visual-Studio-during\/436208\">C++ feedback ticket<\/a> from Developer Community \u2013 Low Priority Builds. With your feedback and collaboration from our partner teams, you can now start Low Priority Builds within Visual Studio. This will ensure the MSBuild node spawns with a lower priority, affecting all compile and link processes. If the build is affecting you from having a responsive work environment, then this is the feature for you! <\/p>\n<p>Internally, VS interfaces with MSBuild like a service. The <a href=\"https:\/\/github.com\/dotnet\/msbuild\">MSBuild team<\/a> has added new API functionality to switch the priority of the MSBuild nodes. Starting in Visual Studio 2022 version 17.3 Preview 1, a new option under the Tools -&gt; Options -&gt; &#8220;Projects and Solutions&#8221; -&gt; &#8220;Build And Run&#8221; -&gt; &#8220;Run build at low process priority&#8221; allows you to lower the priority of the your next builds. If a MSBuild node is already running with the previous priority, then give them a few minutes to time out or restart the IDE to close them.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/06\/lowpriSS.png\"><img decoding=\"async\" class=\"size-medium wp-image-30740 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/06\/lowpriSS-300x96.png\" alt=\"Image lowpriSS\" width=\"300\" height=\"96\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/06\/lowpriSS-300x96.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/06\/lowpriSS-768x247.png 768w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/06\/lowpriSS.png 989w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>For building directly on the command line, use msbuild.exe -lowPriority or -low for similar effect.<img decoding=\"async\" class=\"size-medium wp-image-30748 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/06\/lowpri_taskman_cl-300x118.png\" alt=\"Image lowpri taskman cl\" width=\"300\" height=\"118\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/06\/lowpri_taskman_cl-300x118.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/06\/lowpri_taskman_cl.png 714w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/06\/lowpri_taskman_msbuild.png\"><img decoding=\"async\" class=\"size-medium wp-image-30749 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/06\/lowpri_taskman_msbuild-300x95.png\" alt=\"Image lowpri taskman msbuild\" width=\"300\" height=\"95\" srcset=\"https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/06\/lowpri_taskman_msbuild-300x95.png 300w, https:\/\/devblogs.microsoft.com\/cppblog\/wp-content\/uploads\/sites\/9\/2022\/06\/lowpri_taskman_msbuild.png 719w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Try out low-priority MSBuild tasks by downloading the latest <a href=\"https:\/\/visualstudio.microsoft.com\/vs\/preview\/\">Visual Studio 2022 Preview<\/a>! Any feedback is welcome. We can be reached via the comments below, Developer Community, reach us via email at <a href=\"mailto:visualcpp@microsoft.com\">visualcpp@microsoft.com<\/a>, and Twitter (<a href=\"https:\/\/twitter.com\/visualc\">@VisualC<\/a>).<\/p>\n<p>For other build performance tips and tools: <br \/><a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/cpp-build-throughput-investigation-and-tune-up\/\">https:\/\/devblogs.microsoft.com\/cppblog\/cpp-build-throughput-investigation-and-tune-up\/<\/a> <\/p>\n<p>Thank you, <\/p>\n<p>Felix Huang,<br \/>VC++<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The C++ team is happy to announce the completion of a highly upvoted C++ feedback ticket from Developer Community \u2013 Low Priority Builds. With your feedback and collaboration from our partner teams, you can now start Low Priority Builds within Visual Studio. This will ensure the MSBuild node spawns with a lower priority, affecting all [&hellip;]<\/p>\n","protected":false},"author":16383,"featured_media":35994,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-30732","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cplusplus"],"acf":[],"blog_post_summary":"<p>The C++ team is happy to announce the completion of a highly upvoted C++ feedback ticket from Developer Community \u2013 Low Priority Builds. With your feedback and collaboration from our partner teams, you can now start Low Priority Builds within Visual Studio. This will ensure the MSBuild node spawns with a lower priority, affecting all [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/30732","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/16383"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=30732"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/30732\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/35994"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=30732"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=30732"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=30732"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}