Open jaredpar opened 4 years ago
OmniSharp Roslyn doesn't work great when multi-targeting. The current implementation of the project loader defaults to the first TFM in the list (https://github.com/OmniSharp/omnisharp-roslyn/blob/01b1c216bf191e8e7586ec42b8486282043c7b61/src/OmniSharp.MSBuild/ProjectLoader.cs#L138-L154).
had the same issue with a dependency and ended up forking the dependency to change the order of target frameworks, but surely there must be a better way! It would be great if omnisharp would respect the TargetFramework=...
value in the AdditionalProperties attribute in the ProjectReference tag in the .csproj file.
Also search term for this issue to help find it: CS1705
Is there any workaround for this? It makes vscode for development completely unusable for me
Issue Description
Omnisharp is reporting unexpected errors when opening Roslyn
Steps to Reproduce
Expected Behavior
No problems are reported in the Problems status window
Actual Behavior
There are 38,000+ reported errors. They are all essentially the following error:
This is likely related to the following PR which caused two of the main libraries in Roslyn, including Microsoft.CodeAnalysis, to multi-target between
netstandard2.0
andnetcoreapp3.1
.Logs
OmniSharp log
C# log
Unsure where the C# log is to paste the details here.
Environment information
VSCode version: 1.42.0 C# Extension: 1.21.11
Dotnet Information
.NET Core SDK (reflecting any global.json): Version: 3.1.101 Commit: b377529961 Runtime Environment: OS Name: Windows OS Version: 10.0.18363 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\3.1.101\ Host (useful for support): Version: 3.1.1 Commit: a1388f194c .NET Core SDKs installed: 3.1.101 [C:\Program Files\dotnet\sdk] .NET Core runtimes installed: Microsoft.AspNetCore.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-downloadVisual Studio Code Extensions
|Extension|Author|Version| |---|---|---| |csharp|ms-vscode|1.21.11| |powershell|ms-vscode|2020.1.0| |vim|vscodevim|1.12.4|;