Open delgelato opened 4 years ago
@delgelato That post is a bit old. We have an entry in our wiki for building offline packages - https://github.com/OmniSharp/omnisharp-vscode/wiki/Installing-the-C%23-extension-to-a-computer-without-internet-connectivity. Let me know if you run into any problems.
FWIW, I'm here because my laptop (Linux on an XPS 15, internet always a wee bit brittle with Ubuntu) dropped internet on a reboot. Got the internet worked out by unplugging and replugging the dongle, but what I found more than a little distressing was this same message from VSCode: "Error occurred in loading omnisharp from omnisharp.path" same as reported here.
VSCode was high and dry with nothing functioning. Wait... the internet goes out and suddenly I cannot develop offline?
So.... that was weird.
Once the internet came back, so did Omnisharp.
I have been using OmniSharp without problems on my computer. Today the power went out which resulted in my internet connection dying for a few minutes. During that time I launched VSCode, opened a C# project, and then saw this in the OmniSharp Log:
Error occurred in loading omnisharp from omnisharp.path
Could not start the server due to Error: Request error: getaddrinfo ENOTFOUND roslynomnisharp.blob.core.windows.net
The wiki claims that this shouldn't be the case: https://github.com/OmniSharp/omnisharp-vscode/wiki/Installing-the-C%23-extension-to-a-computer-without-internet-connectivity#installing-on-an-occasionally-connected-computer
make sure you have internet connectivity the first time you use the C# extension. After that you can be offline forever.
However, this was not what experienced. I expected to be able to open up OmniSharp without an internet connection given it was working not 2 minutes prior on the exact same project.
it sounds like you must have "omnisharp.path": "latest" set. it downloads every new pre-release automatically. you can remove it to stick to Omnisharp bundled with the extension
It feels like latest
should fallback to "latest downloaded version" when internet is out, rather than hard failing. Maybe give a warning about being unable to download.
+1 .. it would be nice to work totally offline
15 July 2021, still the same issue. Working offline is impossible
22nd of December 2021, still same issue here.
Same issue here. I am constantly connected to VPN for work, which doesn't have connection to outside internet, so I just get "!!MISSING command!!" and whatnot, but as soon as I disconnect, everything starts working. Our MFA policy makes it extremely unpractical to even consider disconnecting and reconnecting throughout the day to try and get assistance from omnisharp.
Hi, i'm trying to make the extension to work when offline, but it'll be stuck on .. Error occurred in loading omnisharp from omnisharp.path Could not start the server due to Error: Request error: getaddrinfo ENOTFOUND roslynomnisharp.blob.core.windows.net roslynomnisharp.blob.core.windows.net:443
The omnisharp.path was by default set to "latest"
I tried this https://www.towfeek.se/2017/07/05/enabling-csharp-and-dotnet-core-debugging-in-vs-code-from-an-offline-environment/ But after completing it, it's actually to install the extension when there's no internet. I already have the extension, so this is not the correct solution
Also tried changing omnisharp.path in settings to:
-"C:\Users\Owner\.vscode\extensions\ms-vscode.csharp-1.21.11\.omnisharp\1.34.13\OmniSharp.exe" Result: Many logs, among others: OmniSharp server started. Path: C:\Users\Owner.vscode\extensions\ms-vscode.csharp-1.21.11.omnisharp\1.34.13\OmniSharp.exe PID: 12356
-nothing (deleted the entry): Result: Same as above
So, is this even possible? Or does the extension absolutely needs internet?
Cheers