How can I install Visual Studio Code extensions offline?

后端 未结 12 1204
终归单人心
终归单人心 2020-11-27 09:12

I have installed Visual Studio Code on a machine that is not, and cannot be, connected to the Internet. According to the documentation, I can install an extension from the c

12条回答
  •  日久生厌
    2020-11-27 10:03

    As of today the download URL for the latest version of the extension is embedded verbatim in the source of the page on Marketplace, e.g. source at URL:

    https://marketplace.visualstudio.com/items?itemName=lukasz-wronski.ftp-sync

    contains string:

    https://lukasz-wronski.gallerycdn.vsassets.io/extensions/lukasz-wronski/ftp-sync/0.3.3/1492669004156/Microsoft.VisualStudio.Services.VSIXPackage

    I use following Python regexp to extract dl URL:

    urlre = re.search(r'source.+(http.+Microsoft\.VisualStudio\.Services\.VSIXPackage)', content)
    if urlre:
        return urlre.group(1)
    

提交回复
热议问题