Omnisharp-vscode: C# vscode extension fails to download omnisharp - how to install manually?

Created on 18 Jun 2019  Â·  10Comments  Â·  Source: OmniSharp/omnisharp-vscode

Trying to install the C# for VSCode extension, but my internet is terrible so dotnet keeps failing to download omnisharp. I'm using Linux Mint 19.1.

I have managed to download omnisharp-linux-x64-1.32.20.zip manually, but it doesn't come with a vsix file, so I don't know how to install it.

I found the csharp-1.20.0.vsix file, along with the omnisharp-vscode-1.20.0.tar.gz files, but not sure what to do with them...

Any ideas how to manually install the zip?

Most helpful comment

You may also want the Razor language service:

~/.vscode/extensions/ms-vscode.csharp-1.20.0$ grep '"url"' package.json | grep linux-x64 | grep razor
                        "url": "https://download.visualstudio.microsoft.com/download/pr/60003d5d-c896-4db6-a0af-069e1181d0d2/d231bfff6313e0820c63fdb6ded17d67/razorlanguageserver-linux-x64-1.0.0-alpha3-20190606.2.zip",

All 10 comments

@zzstuzor You can install the VSIX in VS Code by going to the extensions tab and using the "..." button to choose "install from VSIX".

You can then create the directory ~\.vscode\extensions\ms-vscode.csharp-1.20.0\.omnisharp\1.32.20 and extract the omnisharp zip file you downloaded into it.

OK Thanks. I have tried that, but it doesn't seem to work.

When I install from .vsix via vscode -> extensions -> Install from .vsix ->
csharp-1.20.0.vsix, it creates the
~.vscode\extensionsms-vscode.csharp-1.20.0.omnisharp\1.32.20 folder
automatically. When I reload vscode it creates the [install.begin] file.

If I unzip the files from the zip into there and reopen vscode (such that
[licence.md] is alongside the [install.begin] file...) it still immediately
starts trying (and failing!) to download omnisharp.

thoughts?

If only dotnet's download functionality were as robust as dpkg then it
would work. dpkg/apt-get seem to work fine for downloading big packages
over a long time even on my terrible internet connection - and also far
more verbose.

On Wed, Jun 19, 2019 at 12:55 AM Ravi Chande notifications@github.com
wrote:

@zzstuzor https://github.com/zzstuzor You can install the VSIX in VS
Code by going to the extensions tab and using the "..." button to choose
"install from VSIX".

You can then create the directory
~.vscode\extensionsms-vscode.csharp-1.20.0.omnisharp\1.32.20 and
extract the omnisharp zip file you downloaded into it.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/OmniSharp/omnisharp-vscode/issues/3123?email_source=notifications&email_token=AEFRZ7275M3I4NZCBI44Q3DP3FDSPA5CNFSM4HY6LL42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX755IA#issuecomment-503307936,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEFRZ75SHFBMART2HIDE6ETP3FDSPANCNFSM4HY6LL4Q
.

I've tried this on Windows and Linux now. In both cases, after extracting the zip into the .omnisharp\ folder I still get vscode starting to download omnisharp as soon as it loads, ignoring all the files there. How can I get it to stop download, and acknowledge the files already present?

@zzstuzor Can you: Remove the 1.32.20 folder created by the C# extension, create a new one and put the contents of your zip file in it. Create a file called install.Lock.

I think that should convince the C# extension that everything has already been downloaded.

Yes that seems to work! install.Lock (case-sensitive!) stops it from trying to download further. Thank-you!!!

Next issue... same problem with: ".NET Core Debugger (Windows / x64)"

Any idea where I can now download this manually? It's hard to find the URLs for all these downloads, would be great if dotnet showed the URL it's getting from in the output window...

That is weird, they should print in the output window. You can find them in package.json.

~/.vscode/extensions/ms-vscode.csharp-1.20.0$ grep coreclr-debug-linux-x64.zip package.json
                        "url": "https://download.visualstudio.microsoft.com/download/pr/1a81b7f6-0ec7-4daa-a5bd-7a4eea0d618a/422bd87c500a7247419315ada701f677/coreclr-debug-linux-x64.zip",
                        "fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-18-4/coreclr-debug-linux-x64.zip",

You may also want the Razor language service:

~/.vscode/extensions/ms-vscode.csharp-1.20.0$ grep '"url"' package.json | grep linux-x64 | grep razor
                        "url": "https://download.visualstudio.microsoft.com/download/pr/60003d5d-c896-4db6-a0af-069e1181d0d2/d231bfff6313e0820c63fdb6ded17d67/razorlanguageserver-linux-x64-1.0.0-alpha3-20190606.2.zip",

Perfect, thanks gregg

For anyone, like me, wondering where they should create install.Lock files, it is the folder where component was unzipped to:

  • .omnisharp/<version>
  • .debugger
  • .razor
Was this page helpful?
0 / 5 - 0 ratings