{"id":243804,"date":"2023-06-22T09:00:48","date_gmt":"2023-06-22T16:00:48","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=243804"},"modified":"2023-06-27T10:18:18","modified_gmt":"2023-06-27T17:18:18","slug":"vs-toolbox-accelerate-your-builds-of-sdk-style-net-projects","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/vs-toolbox-accelerate-your-builds-of-sdk-style-net-projects\/","title":{"rendered":"Visual Studio Toolbox: Accelerate your builds of SDK-style .NET projects"},"content":{"rendered":"<p>The Visual Studio Toolbox show helps you become a more productive developer by focusing on tooling in and out of Visual Studio.\u00a0 Our latest episode of VS Toolbox (available both on\u00a0<a href=\"https:\/\/nam06.safelinks.protection.outlook.com\/?url=https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Fshows%2Fvisual-studio-toolbox%2F&amp;data=05%7C01%7CLeslie.Richardson%40microsoft.com%7C609d7e965e5c4832d77208db66d1647a%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638216821752374052%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=wp1vsZBh3RlYtKVgRyq9JjyEdvPKQOiysIyFI2LE6fo%3D&amp;reserved=0\">Learn<\/a>\u00a0and\u00a0<a href=\"https:\/\/nam06.safelinks.protection.outlook.com\/?url=https%3A%2F%2Fwww.youtube.com%2Fplaylist%3Flist%3DPLReL099Y5nReWwlUgypSKwptZm3ljLOhX&amp;data=05%7C01%7CLeslie.Richardson%40microsoft.com%7C609d7e965e5c4832d77208db66d1647a%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638216821752374052%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=srra5eu4Mwq90E29j5jmlj%2BRfGwSdV%2BXCRanTTzEFWU%3D&amp;reserved=0\">YouTube<\/a>) features Drew Noakes from the .NET team. He demonstrates how you can dramatically reduce build times for SDK-style .NET projects.<\/p>\n<h3>What is build acceleration?<\/h3>\n<p><a href=\"https:\/\/github.com\/dotnet\/project-system\/blob\/main\/docs\/build-acceleration.md\">Build acceleration for .NET SDK style projects<\/a> is an opt-in feature that directs Visual Studio to only build projects that had modifications while skipping projects that were unchanged. Enabling Build Acceleration can reduce incremental build times by up to 80% for SDK-style .NET projects.<\/p>\n<p>To enable build acceleration in your solution, add or edit a top-level <strong>Directory.Build.props<\/strong> file to include the following:<\/p>\n<pre class=\"prettyprint language-default\"><code class=\"language-default\">&lt;<span style=\"color: #008000;\">Project<\/span>&gt;\r\n    &lt;<span style=\"color: #008000;\">PropertyGroup<\/span>&gt;\r\n        &lt;<span style=\"color: #008000;\">AccelerateBuildsInVisualStudio<\/span>&gt;true&lt;\/<span style=\"color: #008000;\">AccelerateBuildsInVisualStudio<\/span>&gt;\r\n    &lt;\/<span style=\"color: #008000;\">PropertyGroup<\/span>&gt;\r\n&lt;\/<span style=\"color: #008000;\">Project<\/span>&gt;<\/code><\/pre>\n<h3>How does build acceleration work?<\/h3>\n<p>Visual Studio uses MSBuild to build .NET projects. There is some overhead associated with calling MSBuild to build each project, so Visual Studio uses a &#8220;fast up-to-date check&#8221; (FUTDC) to avoid calling MSBuild unless needed. This FUTDC can quickly determine if anything has changed in the project that would cause a build to be required.<\/p>\n<p>Sometimes, the FUTDC identifies that no compilation is required, yet identifies some files need to be copied to the output directory, either from the current project or from a referenced one. Historically in this scenario, the FUTDC would call MSBuild to build the project, even though no compilation was required. This was done to ensure that the files were copied to the output directory. With the build acceleration feature, Visual Studio will perform these files copies directly rather than calling MSBuild to do them.<\/p>\n<h3>Learn more about build acceleration on the VS Toolbox show!<\/h3>\n<p>Check out the Visual Studio Toolbox episode below to see Build Acceleration in action and go try out the new feature!<\/p>\n<p><iframe src=\"\/\/www.youtube.com\/embed\/skUKcNMy1DA\" width=\"560\" height=\"314\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Visual Studio Toolbox show helps you become a more productive developer by focusing on tooling in and out of Visual Studio.\u00a0 Our latest episode of VS Toolbox (available both on\u00a0Learn\u00a0and\u00a0YouTube) features Drew Noakes from the .NET team. He demonstrates how you can dramatically reduce build times for SDK-style .NET projects. What is build acceleration? [&hellip;]<\/p>\n","protected":false},"author":651,"featured_media":242192,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[6868,155],"tags":[237,37,53,12],"class_list":["post-243804","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-performance","category-visual-studio","tag-net","tag-msbuild","tag-performance","tag-visual-studio"],"acf":[],"blog_post_summary":"<p>The Visual Studio Toolbox show helps you become a more productive developer by focusing on tooling in and out of Visual Studio.\u00a0 Our latest episode of VS Toolbox (available both on\u00a0Learn\u00a0and\u00a0YouTube) features Drew Noakes from the .NET team. He demonstrates how you can dramatically reduce build times for SDK-style .NET projects. What is build acceleration? [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/243804","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\/651"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=243804"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/243804\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/242192"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=243804"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=243804"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=243804"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}