{"id":19109,"date":"2021-08-09T11:10:13","date_gmt":"2021-08-09T19:10:13","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/powershell\/?p=19109"},"modified":"2021-08-09T11:10:13","modified_gmt":"2021-08-09T19:10:13","slug":"powershell-for-visual-studio-code-august-2021-update","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/powershell-for-visual-studio-code-august-2021-update\/","title":{"rendered":"PowerShell for Visual Studio Code August 2021 Update"},"content":{"rendered":"<div class=\"markdown-body\">We are excited to announce that an update to our <a href=\"https:\/\/aka.ms\/psvscode\" rel=\"nofollow\">PowerShell extension<\/a> is now available on the <a href=\"https:\/\/marketplace.visualstudio.com\/vscode\" rel=\"nofollow\">Visual Studio Code Marketplace<\/a>. This blog will explain what is new in this release as well as what you can expect from extension updates in the coming months.<\/p>\n<h2><a id=\"user-content-whats-new-in-the-powershell-extension-release\" class=\"anchor\" href=\"#whats-new-in-the-powershell-extension-release\" aria-hidden=\"true\"><\/a>What&#8217;s new in the PowerShell Extension release<\/h2>\n<p>This release includes the near-completion of the <a href=\"https:\/\/github.com\/PowerShell\/vscode-powershell\/projects\/10\">CI\/CD Infrastructure Project<\/a>. While our release cadence already doubled over the past six months, the final major piece of this effort is complete: with PRs <a href=\"https:\/\/github.com\/PowerShell\/vscode-powershell\/pull\/3461\">#3461<\/a> and <a href=\"https:\/\/github.com\/PowerShell\/PowerShellEditorServices\/pull\/1528\">#1528<\/a> (among others) the release process has been fully automated.<\/p>\n<p>This means that we can now release the extension any time we like and spend more time building features and fixing bugs! The release process and versioning scheme are <a href=\"https:\/\/github.com\/PowerShell\/vscode-powershell\/blob\/master\/docs\/development.md#creating-a-release\">fully documented<\/a>, but in short:<\/p>\n<ol>\n<li>A maintainer (me) invokes the <code>New-Release<\/code> function from the revamped <a href=\"https:\/\/github.com\/PowerShell\/vscode-powershell\/blob\/master\/tools\/ReleaseTools.psm1\"><code>ReleaseTools<\/code> module<\/a> and supplies the new version numbers.<\/li>\n<li>The module queries GitHub for all merged Pull Requests since the last release and auto-generates the <a href=\"https:\/\/github.com\/PowerShell\/vscode-powershell\/blob\/master\/CHANGELOG.md\">CHANGELOG<\/a> entry, complete with emoji, links to closed bugs, descriptions of work, and thanks to contributors.<\/li>\n<li>The module automatically increments every required version number field in both projects, including tertiary information such as the <code>preview<\/code> flag, description, and icon (which now differs for the stable and preview channels). This prevents the recurrence of bugs where our versions were mismatched, or the stable extension was marked as &#8220;preview&#8221; in the marketplace.<\/li>\n<li>The module automatically pushes the <code>release<\/code> branch to GitHub for both repositories with these changes and opens a Pull Request for the next release.<\/li>\n<li>A maintainer (me) reviews the changelog and when satisfied with any edits, pushes the <code>release<\/code> branches to our internal Azure DevOps mirrors.<\/li>\n<li>This push kicks off Azure Pipelines which complete the rest of the process: PowerShell Editor Services is built, tested, and signed. The <code>ReleaseTools<\/code> module is used by the pipeline to create a draft GitHub release with the signed bits directly uploaded from the secure build agent. The completion of this pipeline triggers the PowerShell Extension&#8217;s pipeline and supplies it with the signed Editor Services bits. This pipeline similarly builds, tests, and signs the extension. The module is then used again to create its draft GitHub release, and then waits for manual approval.<\/li>\n<li>Finally, after manual verification of the extension, a maintainer approves the final deployment step of the pipeline, which automatically uploads the extension to the Visual Studio Code Marketplace directly from the build agent (it also publishes our <code>Install-VSCode.ps1<\/code> script to the PowerShell Gallery).<\/li>\n<\/ol>\n<p>A key improvement is that last step, where the published bits come <em>directly<\/em> from the secure build agents. Previously, a maintainer had to download the bits to their development machine and then upload them manually to all the release locations (GitHub, VS Code Marketplace, PowerShell Gallery). It is well known that the introduction of a developer&#8217;s machine into this workflow is a key point of security failure. Eliminating this step took a herculean effort to coordinate updated build pipelines that automated each step perfectly, moved the pipeline assets along only after signing and verification, ensured that each pipeline used and recorded the correct sources and bits, and asked for just enough manual approval for verification.<\/p>\n<p>In addition to this CI\/CD Infrastructure work (which frankly took the bulk of our time), I&#8217;d like to highlight several other improvements:<\/p>\n<ul>\n<li>Our extensions&#8217; icons are <a href=\"https:\/\/github.com\/PowerShell\/vscode-powershell\/pull\/3493\">refreshed<\/a> to match those of PowerShell 7, with the preview channel having its own special preview icon.<\/li>\n<li>PowerShell Editor Services is getting cleaned up: the <a href=\"https:\/\/github.com\/PowerShell\/PowerShellEditorServices\/pull\/1533\">.NET Code Analyzer<\/a> was updated and many warnings were completely fixed and then marked as errors to prevent re-introductions.<\/li>\n<li>A major source of bugs with PSReadLine has been <a href=\"https:\/\/github.com\/PowerShell\/PowerShellEditorServices\/pull\/1514\">resolved<\/a> by forcing PowerShell Editor Services to load <em>only<\/em> its bundled modules. Advanced users can still beta test updated versions of bundled modules (such as PSReadLine and PSScriptAnalyzer) through the <code>powershell.developer.bundledModulesPath<\/code> setting, but for the vast majority of users the extension is more likely to just work as expected.<\/li>\n<\/ul>\n<p>For the full list of updates please refer to the <a href=\"https:\/\/github.com\/PowerShell\/vscode-powershell\/blob\/master\/CHANGELOG.md\">changelog<\/a>.<\/p>\n<h2><a id=\"user-content-whats-next-for-the-extensions\" class=\"anchor\" href=\"#whats-next-for-the-extensions\" aria-hidden=\"true\"><\/a>What&#8217;s next for the extensions<\/h2>\n<p>Our upcoming work includes:<\/p>\n<ol>\n<li>The completion of the <a href=\"https:\/\/github.com\/PowerShell\/vscode-powershell\/projects\/14\">Editor Services Pipeline project<\/a>, which will simplify our threading model and reduce the issues caused by race conditions and deadlocks.<\/li>\n<li>The related <a href=\"https:\/\/github.com\/PowerShell\/vscode-powershell\/projects\/9\">Debug Reliability project<\/a> which turns out to be mostly caused by threading deadlocks.<\/li>\n<li>And finally the <a href=\"https:\/\/github.com\/PowerShell\/vscode-powershell\/projects\/15\">VS Code Compatibility project<\/a> where we are trying to get the extension up-to-date with the editor&#8217;s best practices and newest features.<\/li>\n<\/ol>\n<p>You can track the progress on all of these projects, and others on our roadmap, in our <a href=\"https:\/\/github.com\/PowerShell\/vscode-powershell\/projects\">GitHub repository<\/a>.<\/p>\n<h2><a id=\"user-content-getting-support-and-giving-feedback\" class=\"anchor\" href=\"#getting-support-and-giving-feedback\" aria-hidden=\"true\"><\/a>Getting support and giving feedback<\/h2>\n<p>If you encounter any issues with the PowerShell extension in Visual Studio Code or have feature requests, the best place to get support is through our <a href=\"https:\/\/github.com\/PowerShell\/vscode-powershell\/\">GitHub repository<\/a>.<\/p>\n<p>Andy Schwartzmeyer with collaboration from Rob Holt, Sydney Smith, and others.<\/p>\n<p>PowerShell Team<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>We are excited to announce that an update to our PowerShell extension is now available on the Visual Studio Code Marketplace. This blog will explain what is new in this release as well as what you can expect from extension updates in the coming months. What&#8217;s new in the PowerShell Extension release This release includes [&hellip;]<\/p>\n","protected":false},"author":62819,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[3175],"class_list":["post-19109","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell","tag-visual-studio-code"],"acf":[],"blog_post_summary":"<p>We are excited to announce that an update to our PowerShell extension is now available on the Visual Studio Code Marketplace. This blog will explain what is new in this release as well as what you can expect from extension updates in the coming months. What&#8217;s new in the PowerShell Extension release This release includes [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/19109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/62819"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=19109"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/19109\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=19109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=19109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=19109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}