{"id":225420,"date":"2019-05-20T08:00:47","date_gmt":"2019-05-20T15:00:47","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=225420"},"modified":"2019-05-30T09:08:49","modified_gmt":"2019-05-30T16:08:49","slug":"updates-to-synchronous-autoload-of-extensions-in-visual-studio-2019","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/updates-to-synchronous-autoload-of-extensions-in-visual-studio-2019\/","title":{"rendered":"Updates to synchronous autoload of extensions in Visual Studio 2019"},"content":{"rendered":"<p>Since announcing that Visual Studio 2019 v16.1 will block any extension from synchronously autoloading, we\u2019ve seen a tremendous effort of both 1<sup>st<\/sup> and 3<sup>rd<\/sup>-party extensions to implement async background load. It\u2019s been truly amazing to see the community of extension authors stepping up to the task. Many even did it long before we announced Visual Studio 2019.<\/p>\n<p>The result is faster startup and solution load times for Visual Studio, as well as fewer UI delays cause by blocking operations on the main thread. So, a big THANK YOU to all extension authors for all the hard work to make this happen.<\/p>\n<h2>Control the behavior<\/h2>\n<p>By default, Visual Studio 2019 v16.1 blocks any synchronously autoloaded package from any extension and shows a notification to alert the user about it.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-225422\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/05\/yellow-bar.png\" alt=\"Yellow bar notification\" width=\"1039\" height=\"23\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/05\/yellow-bar.png 1039w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/05\/yellow-bar-300x7.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/05\/yellow-bar-768x17.png 768w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/05\/yellow-bar-1024x23.png 1024w\" sizes=\"(max-width: 1039px) 100vw, 1039px\" \/><\/p>\n<p>What\u2019s new is that the individual user can now control how they would like the extension to load. The reason for this change is two-fold.<\/p>\n<p>First, most extensions now support async background loading, which improves startup and solution load performance across the board. Second, there exist a class of extensions developed and used internally in companies around the world that for various reasons cannot support async background load. It\u2019s usually because they no longer have the source code or the person who originally built the extension is no longer working at the company.<\/p>\n<p>To stop blocking synchronously autoloaded extensions, you can either click the <em>Allow synchronous autoload<\/em> on the yellow notification bar or check a new checkbox in the options dialog.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-225421\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/05\/options-page.png\" alt=\"Extensions options\" width=\"741\" height=\"431\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/05\/options-page.png 741w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/05\/options-page-300x174.png 300w\" sizes=\"(max-width: 741px) 100vw, 741px\" \/><\/p>\n<p>It\u2019s important to stress that we really don\u2019t recommend to anyone that they allow synchronous autoload, but we recognize the need to be able to unblock users and teams to do their job. Even when we know it leads to degraded performance of Visual Studio.<\/p>\n<h2>Group policy<\/h2>\n<p>To set this option for all team members, the IT admin can now <a href=\"https:\/\/docs.microsoft.com\/visualstudio\/install\/visual-studio-administrator-guide\">set a registry key through Group Policy<\/a>. When the Group Policy is set, it takes precedence over the individual user\u2019s ability to change the option themselves, and the checkbox is greyed out and disabled.<\/p>\n<h2>Marketplace updates<\/h2>\n<p>Extension authors must still use <a href=\"https:\/\/github.com\/microsoft\/VSSDK-Extensibility-Samples\/tree\/master\/AsyncPackageMigration\">AsyncPackage and enable background load<\/a>. An update to the Marketplace shows errors when uploading any extension supporting Visual Studio 2019 that uses synchronous autoload. This update is in place since no extension can make assumptions about the users allowing synchronously autoloaded extensions.<\/p>\n<h2>Simply put<\/h2>\n<p>Here\u2019s a bullet list to sum it up:<\/p>\n<ul>\n<li>Marketplace requires autoload to be async and in the background<\/li>\n<li>Users and IT admins can opt out of the blocking behavior (not recommended)<\/li>\n<li>Autoloading extension should <strong>always<\/strong> happen asynchronously in the background<\/li>\n<\/ul>\n<p>Again, thank you so much for your efforts to make Visual Studio perform better to the benefit of all users. We appreciate the hard work and understand that on many cases it took a considerable amount of work to make this happen. You have our sincerest respect and admiration.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Visual Studio 2019 starts blocking synchronously autoloaded extensions in version 16.1.  We\u2019ve seen a tremendous effort of both 1st- and 3rd-party extensions to implement async background load. It\u2019s been truly amazing to see the community of extension authors stepping up to the task. <\/p>\n","protected":false},"author":642,"featured_media":225421,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1388,155],"tags":[294,12],"class_list":["post-225420","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-extensibility","category-visual-studio","tag-extensions","tag-visual-studio"],"acf":[],"blog_post_summary":"<p>Visual Studio 2019 starts blocking synchronously autoloaded extensions in version 16.1.  We\u2019ve seen a tremendous effort of both 1st- and 3rd-party extensions to implement async background load. It\u2019s been truly amazing to see the community of extension authors stepping up to the task. <\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/225420","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\/642"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=225420"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/225420\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/225421"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=225420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=225420"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=225420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}