Solvedomnisharp vscode Always show "Downloading package 'OmniSharp (.NET 4.6 / x64)' (12310 KB) ."

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-preview2-003121)

Product Information:
 Version:            1.0.0-preview2-003121
 Commit SHA-1 hash:  1e9d529bc5

Runtime Environment:
 OS Name:     Windows
 OS Version:  6.1.7601
 OS Platform: Windows
 RID:         win7-x64

VS Code version: 1.7.2
C# Extension version: 1.5.3

Steps to reproduce

Open vscode
Open a .cs file

Expected behavior

Actual behavior

OUTPUT

Updating C# dependencies...
Platform: win32, x86_64 (win7-x64)

Downloading package 'OmniSharp (.NET 4.6 / x64)' (12310 KB) .Failed at stage: downloadPackages
Error: read ECONNRESET

Finished
[ERROR]: C# Extension failed to install the debugger package

I check the package.json file and find the this:

{
	"description": "OmniSharp (.NET 4.6 / x64)",
	"url": "https://omnisharpdownload.blob.core.windows.net/ext/omnisharp-win-x64-1.9-beta19.zip",
	"installPath": "./bin/omnisharp",
	"platforms": [
		"win32"
	],
	"architectures": [
		"x86_64"
	]
},

and

{
	"description": ".NET Core Debugger (Windows / x64)",
	"url": "https://vsdebugger.azureedge.net/coreclr-debug-1-5-0/coreclr-debug-win7-x64.zip",
	"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-5-0/coreclr-debug-win7-x64.zip",
	"installPath": ".debugger",
	"runtimeIds": [
		"win7-x64"
	]
}

I download those files(coreclr-debug-win7-x64.zip and omnisharp-win-x64-1.9-beta19.zip) manually and decompression those files, and copy them to
.vscode\extensions\ms-vscode.csharp-1.5.3\bin\omnisharp and
.vscode\extensions\ms-vscode.csharp-1.5.3\.debugger
But can't resolve it. Is there some way install them manually?

35 Answers

✔️Accepted Answer

Sorry for the delay. I needed to get 1.6 out the door before taking some time to write up the steps below. Note that this isn't much fun, but you can use these steps to download the necessary packages and installing them manually. This really isn't supported but it should work.

  1. Download the relevant packages using the URLs from the "runtimeDependencies" node in the extension's package.json file. Make a note of which package entries in the "runtimeDependencies" node you're downloading from because you'll use additional information from those entries in the next steps.

    • Windows:
      • OmniSharp: Either "OmniSharp (.NET 4.6 / x86)" or "OmniSharp (.NET 4.6 / x64)" depending on whether you're running 32-bit or 64-bit Windows respectively.
      • Debugger: ".NET Core Debugger (Windows / x64)" (Note: 32-bit Windows is not yet supported by the debugger. If you're running 32-bit Windows, you can skip the debugger.)
    • OSX:
      • Mono: "Mono Runtime (macOS)" and "Mono Framework Assemblies"
      • OmniSharp: "OmniSharp (Mono 4.6)"
      • Debugger: ".NET Core Debugger (macOS / x64)"
    • Linux:
      • Mono: Either "Mono Runtime (Linux / x86)" or "Mono Runtime (Linux / x64)" (depending on whether your're running on 32-bit or 64-bit Linux), and "Mono Framework Assemblies"
      • OmniSharp: "OmniSharp (Mono 4.6)"
      • Debugger: A version of the debugger that matches your distro (there are several).
  2. Unzip each package that you downloaded into a subdirectory within the extension install folder.

    • Extension install folder: The extension install folder is located at %UserProfile%\.vscode\extensions\ms-vscode.csharp-<version> on Windows and ~/.vscode/extensions/ms-vscode.csharp-<version> on OSX/Linux.
    • Subdirectory: The subdirectory is specified by the package's "installPath" from the "runtimeDependencies" node.

    For example, on 64-bit Windows, you'd unzip "OmniSharp (.NET 4.6 / x64)" to %UserProfile%\.vscode\extensions\ms-vscode.csharp-<version>\bin\omnisharp.

  3. (OSX/Linux-only) Mark files in the "binaries" section of a package's "runtimeDependencies" entry as executable with chmod 755 <file path>. Note that these file paths are relative to the package's "installPath".

  4. Create a 0-length file called "install.Lock" in the extension install folder. This is easily done with touch install.Lock in an OSX/Linux terminal window or copy NUL > install.Lock at a Windows command prompt.

And that should be it! If everything is right, you should be able to launch Visual Studio Code with a C# .NET Core project and get IntelliSense and debugging (if the debugger is supported on your platform).

Other Answers:

This is still happening to me with the latest version (of VSC) on all 3 OSs (win/mac/lin); after a VSC restart, it always downloads these again.

I deleted C:\Users\USER.vscode\extensions\ms-vscode.csharp-1.8.1\install.Begin and it worked

Confirmed, it's still happening on Windows 10

@DustinCampbell At first I use Shadowsocks. While I close the proxy, still has this issue. I am in china, So the download speed is relatively slow.

More Issues: