简体   繁体   中英

ECONNREFUSED 127.0.0.1:9000 on OmniSharp install in Visual Studio Code on WSL2 behind corporate cloud proxy

I have Visual Studio Code operating with Remote WSL 2 on Ubuntu 20.04 (on a Win10 box behind a corporate firewall) and wanted to install the C# extension.

On addition of the extension and each time I entered VS Code / WSL 2 on that particular workspace, the extension is not able to install the required OmniSharp & Co. packages:

Error: connect ECONNREFUSED 127.0.0.1:9000

After checking several other posts I found the NO_PROXY environment variable, which does the trick when placed in .profile .

Steps:

  1. add to your ~/.profile on WSL2:
export NO_PROXY=roslynomnisharp.blob.core.windows.net,vsdebugger.blob.core.windows.net,razorvscodetest.blob.core.windows.net
  1. close and start Visual Studio Code with Remote WSL again in the designated workspace

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM