Visual Studio Code for PowerShell 7

栏目: IT技术 · 发布时间: 5年前

内容简介:March 5th, 2020
Visual Studio Code for PowerShell 7

Sydney

March 5th, 2020

We are excited to announce that we have released a major update to the PowerShell extension for Visual Studio Code. This release contains months of architectural work that first shipped in our PowerShell Preview extension in November of 2019, along with incremental bug fixes in the intervening months. If you are new to Visual Studio Codethis article is helpful for getting started. If you already use Visual Studio Code with the PowerShell extension, read on to find out what is new.

What’s new

ISE Compatibility Module

We took the documentation from our “How to replicate the ISE experience in Visual Studio Code” doc and turned it into a switch to make the process of using Visual Studio code more familiar for Windows PowerShell ISE users.

This work can largely be seen in:

vscode-PowerShell #2335

Add editor command PowerShell: Enable/Disable ISE Mode for ISE emulation in VS Code. (Thanks @Corbob)

Syntax Highlighting, Multi-Line Editing and Back Search in the Integrated Console

PSReadLine, the module that provides the powerful command line-editing experience you are used to in the PowerShell console

(including syntax highlighting, multi-line editing and, back search), is now available in the Visual Studio Code integrated console across all operating systems. Full PSReadLine support has long been at the top of our list for feature requests.

It has also been among our most difficult problems to solve because at its core it also required architectural changes in how the PowerShell extension manages threading and runspaces. The additional challenge of trying to support both legacy versions of PowerShell and a range of platform distributions has caused this problem to continually be delayed. In January of 2019 we released a Preview version of the PowerShell extension which was built on .NET Standard thereby enabling us to support PSReadLine in the integrated console for Windows users on PowerShell Version 5.1 and above.

With PowerShell 7 delivering a fix in .NET Core 3.1 for the way POSIX terminal APIs are handled when starting new processes, we are finally able to move the PSReadLine support currently available in the PowerShell Preview extension into the stable PowerShell extension with support across platform distributions.

This work can largely be seen in:

PowerShellEditorServices #672

PSReadLine integration (Thanks @SeeminglyScience!)

Performance Improvements

Our number one user request for the PowerShell editing experience in Visual Studio Code is to improve the stability of the editor and debugger. Long-standing constraints in the original design of the PowerShell extension made it difficult to improve its robustness through incremental changes. Instead, over a period of six months we prioritized work to re-architect the extension with an emphasis on stability. Omnisharp’s architecture is more robust meaning that bugs that might once have been crashes will now be caught and logged. By leveraging this library we were able to greatly simplify our code and are now more compliant with language server protocol.

Ultimately, we believe that these changes will significantly reduce the number crashes of the extension and improve the performance overall. Other features of the Omnisharp port include asynchronous message handling for increase in performance, CodeLens requests no longer depending on running PowerShell (greatly improving Intellisense responsiveness), and formatting handled directly by the language server.

This work can be seen in:

PowerShellEditorServices #1056

Re-architect PowerShell Editor Services to use the Omnisharp LSP platform.

Other features

A number of other features have been available in the PowerShell Preview extension that are now available in the PowerShell extension.

For a full list of changes see our detailed changelog .

Breaking Changes

Support for PSReadLine in the PowerShell extension Integrated Console depends on changes made in PSReadLine 2.0, which does not support PowerShell versions 3 and 4. In turn, we also made the difficult decision to no longer support PowerShell 3 and 4 in future updates of the extension. In making this decision we analyzed the use of these PowerShell versions and found that approximately 1% of PowerShell session in VSCode use one of these versions. In order to accommodate these use cases we will shipped a final stable version of the extension with PowerShell version 3 and 4 support which can continue to be used (2020.01). To use this version of the extension the user will still install the PowerShell extension through the VSCode marketplace. They will then need to use the extension settings to select their desired version.

This breaking change can be seen in:

PowerShellEditorServices #741

Migrate to netstandard2.0 and PSStandard

We also made the decision to close over a number of APIs that were not designed for public exposure.

For more detailed information on this decision check out PowerShellEditorServices #1183 .

What’s going to happen to the Preview Extension?

Going forward we will use preview as a vNext of our stable extension, so a preview release will take bugfixes and become the next stable release. After this release we plan to continue to address other outstanding issues in the extension, and use the PowerShell Preview extension as a means of increasing our release cadence.

Feedback and Support

Once we make these releases we will continue to make investments in the PowerShell editing experience. 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 GitHub repository.

Sydney Smith, Robert Holt, Tyler Leonhardt

PowerShell Team


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

游戏化革命:未来商业模式的驱动力

游戏化革命:未来商业模式的驱动力

[美]盖布·兹彻曼、[美]乔斯琳·林德 / 应皓 / 中国人民大学出版社有限公司 / 2014-8-1 / CNY 59.00

第一本植入游戏化理念、实现APP互动的游戏化商业图书 游戏化与商业的大融合、游戏化驱动未来商业革命的权威之作 作者被公认为“游戏界的天才”,具有很高的知名度 亚马逊五星级图书 本书观点新颖,游戏化正成为最热门的商业新策略 游戏化是当今最热门的商业新策略,它能帮助龙头企业创造出前所未有的客户和员工的参与度。商业游戏化策略通过利用从游戏设计、忠诚度计划和行为经济学中所汲取......一起来看看 《游戏化革命:未来商业模式的驱动力》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

html转js在线工具
html转js在线工具

html转js在线工具