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

768 views Asked by At

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
1

There are 1 answers

0
Kai Walter On BEST ANSWER

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