【问题标题】:Error on installing C# Extension for VSCode为 VSCode 安装 C# 扩展时出错
【发布时间】:2017-11-27 09:44:02
【问题描述】:

我正在尝试安装 VSCode 扩展 C# for Visual Studio Code (powered by OmniSharp),但没有成功。在 VSCode 的 Output 选项卡中,我收到以下错误:

Updating C# dependencies...
Platform: win32, x86_64

Downloading package 'OmniSharp for Windows (.NET 4.6 / x64)'    Retrying from 'https://omnisharpdownload.blob.core.windows.net/ext/omnisharp-win-x64-1.26.3.zip' Downloading package '.NET Core Debugger (Windows / x64)'   Retrying from 'https://vsdebugger.blob.core.windows.net/coreclr-debug-1-13-0/coreclr-debug-win7-x64.zip' 
Installing package 'OmniSharp for Windows (.NET 4.6 / x64)'
Failed at stage: installPackages
Error: end of central directory record signature not found

Finished

【问题讨论】:

    标签: c# visual-studio-code omnisharp


    【解决方案1】:

    根据我在omnisharp-vscode GitHub页面上找到的相关问题:

    并且知道我在企业代理后面,我必须在 vscode 中设置 http.proxy 设置,就像在我的 vscode 用户设置中那样:

    {
        "http.proxy": "<my-proxy-uri>" // e.g. http://1.2.3.4:55,
    }
    

    【讨论】:

      【解决方案2】:

      检查omnisharp下载失败的原因总是更好。

      您可以通过将选项卡切换到 Output 然后将下拉菜单更改为 OmniSharp Log

      来进行检查

      对我来说,错误每次都不一样,大部分时间是公司代理,而下一次是不兼容的 c# 扩展,正在下载omnisharp。

      出现此问题主要是因为 VS Code 试图自动下载和安装文件,但公司代理阻止了该文件。

      要解决此问题,请单击错误链接手动下载文件,

      关闭Vs代码,根据omnisharp日志手动解压下载的zip并粘贴到位置

      现在你必须准备好了。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2011-05-27
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-10-16
        • 1970-01-01
        • 2019-07-15
        • 1970-01-01
        相关资源
        最近更新 更多