-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OmniSharp.SdkInstanceProvider fails to parse 'omnisharp.sdkVersion' and 'omnisharp.sdkPath' #2412
OmniSharp.SdkInstanceProvider fails to parse 'omnisharp.sdkVersion' and 'omnisharp.sdkPath' #2412
Comments
The impact is that this bug prevents users from building .NET Core 3.1 SDK-style projects. |
@BBergquist So the issue is with the setting descriptions. Let me remove the quotes from the recommended values as they were not intended to part of the value. |
I'm still receiving this same error when I tried setting the sdkPath and the sdkVersion on v1.25.1-beta. |
@estellise-yukihime What values are you using? |
@JoeRobich These are my values in vscode settings.json: {
"omnisharp.sdkVersion": "6.0.401",
"omnisharp.sdkPath": "/usr/local/share/dotnet/sdk/6.0.401/"
} This is the omnisharp log: [fail]: OmniSharp.MSBuild.Discovery.Providers.SdkInstanceProvider
The Sdk version specified in the OmniSharp settings was not a valid semantic version. Configured version is ''6.0.401''. Please update your settings and restart OmniSharp.
[fail]: OmniSharp.MSBuild.Discovery.Providers.SdkOverrideInstanceProvider
The Sdk path specified in the OmniSharp settings does not exist. Configured path is ''/usr/local/share/dotnet/sdk/6.0.401/''. Please update your settings and restart OmniSharp. Is it because the VSCode extension adds the quotes here: |
That fixed it for me, if I edit |
Please reopen the issue, it is not solved.
"omnisharp.sdkPath": "C:/Program Files/dotnet/sdk/6.0.403",
"omnisharp.sdkVersion": "6.0.403", Omnisharp version v1.25.2 |
Repro (using the latest version of OmniSharp w/
omnisharp.useModernNet
enabled):omnisharp.sdkVersion
oromnisharp.sdkPath
with any value (including the recommended values: "6.0.300" or "/home/username/dotnet/sdks/6.0.300").Expected behavior: OmniSharp successfully restarts, finding the specified SDK version from the user settings.
Actual behavior:
[fail]: OmniSharp.MSBuild.Discovery.Providers.SdkInstanceProvider The Sdk version specified in the OmniSharp settings was not a valid semantic version. Configured version is ''6.0.300''. Please update your settings and restart OmniSharp.
I checked the regex found in the code. 6.0.300 (no quotes) is a valid semantic version, but '6.0.300' is not. That paired with the logging message showing double ticks suggests that OmniSharp is receiving the setting value with extra quotes and needs to strip them out.
The text was updated successfully, but these errors were encountered: