Visual Studio Code的脱机扩展

时间:2016-05-24 11:41:01

标签: powershell visual-studio-code

如何从https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell下载离线扩展程序?

我尝试这个模板

https://${ publisher }.gallery.vsassets.io/_apis/public/gallery/publisher/${ publisher }/extension/${ extension name }/${ version }/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage

但此链接https://microsoft.gallery.vsassets.io/_apis/public/gallery/publisher/microsoft/extension/PowerShell/0.6.1/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage会返回错误。

{"$id":"1","innerException":null,"message":"The requested extension doesn't exist.","typeName":"Microsoft.VisualStudio.Services.Gallery.WebApi.ExtensionDoesNotExistException, Microsoft.VisualStudio.Services.Gallery.WebApi","typeKey":"ExtensionDoesNotExistException","errorCode":0,"eventId":3000}

1 个答案:

答案 0 :(得分:1)

来自链接https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell可以提取发布商和扩展名。在页面上找到最新版本。

publisher = ms-vscode
extension name = PowerShell
version = 0.6.1

工作链接https://ms-vscode.gallery.vsassets.io/_apis/public/gallery/publisher/ms-vscode/extension/PowerShell/0.6.1/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage

Microsoft.VisualStudio.Services.VSIXPackage重命名为Microsoft.VisualStudio.Services.VSIX

拖放到VSCore。 VSCore离线安装此扩展程序。