-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 doesn't work with latest .NET 6 SDK #17718
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Related: dotnet/core#6278 |
From what I've been testing, the issue is with the OmniSharp/omnisharp-roslyn#2134 I can make things run again by using an older version of the MSBuildSDKResolver |
/cc @rainersigwald |
Are there test cases for this? I ran into this a couple years ago, too. I've seen plenty of other folks filing issues on this on GH and SO. Example: dotnet/vscode-csharp#2937 |
I have it working with a later MSBuildSdkResolver.
|
This is an OmniSharp issue. It packages tools including the .NET SDK resolver that's used to import the .NET SDK. The .NET 6 SDK is configured so that it can be loaded only in MSBuild 16.10 and newer, but there were "MSBuild 16.10.0-preview" releases that go with One thing I'm confused by though @richlander--on Windows, OmniSharp should default to using a Visual Studio copy of MSBuild and so not hit this if you have a VS installed. For instance in my log (toward the very top):
Are you seeing otherwise? That might be an unrelated O# issue. |
The more I think about it, the more I believe this issue is something likely to occur with Win Arm64 devices and Linux/macOS. On Win Arm64 VSCode, it fails to resolve MSBuild instances except for the Standalone (even though the OmniSharp executable and OmniSharp.MSBuild.dll are .NET 4.7.2 and I have the latest VS 2019 Enterprise Preview installed). |
@rainersigwald -- I thought it wasn't working on my Windows machine, but it looks good now. Must be my macOS machine only. I updated VS during this same experience, so it's possible that new bits came down that improved the situation after I tried O#. [info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 2 MSBuild instance(s)
1: Visual Studio Community 2019 16.10.31313.381 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin"
2: StandAlone 16.9.0 - "c:\Users\rich\.vscode\extensions\ms-dotnettools.csharp-1.23.11\.omnisharp\1.37.8\.msbuild\Current\Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: Visual Studio Community 2019 16.10.31313.381 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin" I think you are right that this is an O# issue and it's msbuild is too old. /cc @JoeRobich @cartermp |
Closing as this is tracked in this issue: dotnet/core#6278 |
I tried .NET 6 Preview 5 and 6, on Windows and macOS. I get this error in the O# logs. As a result, I cannot use VS Code for C#.
Microsoft.Build.Exceptions.InvalidProjectFileException: The SDK 'Microsoft.NET.SDK.WorkloadAutoImportPropsLocator' specified could not be found. C:\Program Files\dotnet\sdk\6.0.100-preview.5.21269.7\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.props
Is this an O# or SDK issue?
No repro in VS 16.10 P4.
The text was updated successfully, but these errors were encountered: