VSCode 在尝试安装 C# 扩展时出错,提示无法安装依赖项

时间:2021-07-09 07:51:00

标签: unity3d visual-studio-code

我正在尝试使用 VScode 设置 unity 我被告知要安装 C# 扩展以使其自动完成 unitys 代码,但是当我尝试安装 C# 时出错,这是错误,我在 Linux 系统上我不知道有没有关系。

Installing C# dependencies...
Platform: linux, x86_64, name=manjaro, version=unknown

Downloading package '.NET Core Debugger (linux / x64)' Failed to download from https://github.com/Samsung/netcoredbg/releases/download/1.2.0-825/netcoredbg-linux-bionic-amd64.tar.gz. Error code '404')
    Retrying from 'https://web.archive.org/web/20201125201611/https://github-production-release-asset-2e65be.s3.amazonaws.com/113926796/2a979180-2f1f-11eb-8254-5746e29dc86d?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20201125%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20201125T201611Z&X-Amz-Expires=300&X-Amz-Signature=16e82fadc53b2c8965a4921f7b4241df4b7d8ec1366d08a2e47d5ad840c80444&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=113926796&response-content-disposition=attachment%3B%20filename%3Dnetcoredbg-linux-bionic-amd64.tar.gz&response-content-type=application%2Foctet-stream' (NaN KB) Done!
Installing package '.NET Core Debugger (linux / x64)'

Failed at stage: installPackage
C# Extension was unable to install its dependencies. Please check your internet connection. If you use a proxy server, please visit https://aka.ms/VsCodeCsharpNetworking

我该如何解决这个问题,它不会安装并不断重试安装但每次都失败,它说明了我的连接,但它很好,所以...

1 个答案:

答案 0 :(得分:2)

按照以下说明操作:

Install And Configure VSCode for Linux

完成所有这些后,如果智能感知不起作用,打开 VS Code,转到菜单 File - Preferences - Settings - Extension - C# configuration 查找“Omnisharp:使用全局单声道”,并将其设置为“始终”。

然后关闭 VSCode,然后重新打开它。