dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.88k stars 676 forks source link

Keeps downloading Omnisharp #3862

Open tluyben opened 4 years ago

tluyben commented 4 years ago

Environment data

dotnet --info output:

.NET Core SDK (reflecting any global.json): Version: 3.1.101 Commit: b377529961

Runtime Environment: OS Name: ubuntu OS Version: 18.04 OS Platform: Linux RID: ubuntu.18.04-x64 Base Path: /usr/share/dotnet/sdk/3.1.101/

Host (useful for support): Version: 3.1.1 Commit: a1388f194c

.NET Core SDKs installed: 2.1.300-rc1-008673 [/usr/share/dotnet/sdk] 2.1.804 [/usr/share/dotnet/sdk] 3.1.101 [/usr/share/dotnet/sdk]

.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.0-rc1-final [/usr/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.16 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.0-rc1-final [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.16 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.0-rc1 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.16 [/usr/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

VS Code version: 1.46.1 C# Extension version: v1.22.1

OmniSharp log

Steps to reproduce

Expected behavior

Actual behavior

This issue has been reported here before but the 'fixes' there did not help. I'm not behind a proxy (I am reporting this on another connection than my home connection for instance and it happens here too) and it happens on win/lin/mac (all the same VSC version and dotnet runtime; I develop on all 3).

My connection is fast enough so it's not a real bother, but it seems a bug as it definitely did download before and it works fine once downloaded, so why does it download again?

nGoline commented 4 years ago

Environment data

dotnet --info output:

.NET Core SDK (reflecting any global.json):
 Version:   3.1.301
 Commit:    7feb845744

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  18.04
 OS Platform: Linux
 RID:         ubuntu.18.04-x64
 Base Path:   /usr/share/dotnet/sdk/3.1.301/

Host (useful for support):
  Version: 3.1.5
  Commit:  65cd789777

.NET Core SDKs installed:
  3.0.103 [/usr/share/dotnet/sdk]
  3.1.301 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.0.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.0.3 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

OmniSharp log

Getting latest OmniSharp version information
Downloading package 'Latest OmniSharp Version Information' (1 KB).................... Done!
Installing OmniSharp Version = 1.35.4-beta.18...
Platform: linux, x86_64, name=ubuntu, version=18.04

Downloading package 'OmniSharp for Linux (x64), Version = 1.35.4-beta.18' (45173 KB)

Steps to reproduce

Expected behavior

Actual behavior

It bothers me downloading 45MB again and again every day.

nGoline commented 4 years ago

It would be nice if we could skip the beta channel as well so when it's fixed it would not download any beta version of OmniSharp.

filipw commented 4 years ago

This is by design. 1.35.4-beta.18 in your log suggests that you have opted into beta builds of OmniSharp by setting "omnisharp.path": "latest" in your VS Code settings. There is a new prerelease build on every merge to master, which can be multiple times a day (not to mention it is highly likely that these CI builds are unstable, as by definition they are not always ready for the release, so your experience can be very poor).

It is not recommended to use this setting for longer than a short while (e.g. to verify a specific bug fix). Please remove that setting to prevent OmniSharp beta builds to be constantly downloaded.

tluyben commented 4 years ago

My omnisharp.path is not set (so the default I assume). These are also all clean installs of vs code & c# extension, so I would not have touched that and I indeed did not...

filipw commented 4 years ago

yes sorry for the confusion my response was aimed at @nGoline

nGoline commented 4 years ago

Thank you @filipw, it worked despite the fact that I don't remember setting this before. But indeed I was using "omnisharp.path": "latest". Nonetheless, it's confusing that "latest" subscribes to beta channels. IMO it should have another flag for this.

It also bothers me that the extension tries to download it several times if I open another instance while it's still downloading. It should have a lock file to instruct new instances that a download is in place.

auspex commented 3 years ago

This seems to happen to me every time I start VC. It's very annoying as my Internet can be very poor, and the current 47240KB has already taken over half an hour. Since there's nothing in the Omnisharp log, I rather suspect that it's long since timed out.

clankill3r commented 3 years ago

I am not using "omnisharp.path": "latest". but for me it always is downloading it as well. I did a fresh install of my OS (osx), a few weeks ago. But I remember I had this before that as well. It seems like a bug, or poor design that the "latest" behavior is the default behavior.

JoeRobich commented 3 years ago

@clankill3r We generally release a new build every 2 -3 weeks. When those releases happen, you will see a new build downloaded in VS Code. The "latest" behavior is not the default, but we have seen many getting started tutorials include it as a step.

How often are you seeing new releases downloaded? Does the download complete during your VS Code session?

clankill3r commented 3 years ago

@JoeRobich I will pay more attention to it, maybe it's not as frequent as I thought. I don't use unity that much...

CanavarB commented 1 year ago

https://github.com/dotnet/vscode-csharp/issues/3724#issuecomment-1700576564