omnisharp-roslyn: VS 2019 Preview 16.6 not being picked over 16.5 causes issues with net5.0
In a solution I’m working on, I have a WPF project which references a library project. Both are currently targeting netcoreapp5.0 which works fine. If I change both to target net5.0 (the preferred TFM going forward), I get this error from OmniSharp:
Project '..\core\core.csproj' targets 'net5.0'. It cannot be referenced by a project that targets '.NETCoreApp,Version=v5.0'.
(Fwiw, I made absolutely sure there are no projects still using netcoreapp5.0 in the solution.)
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (6 by maintainers)
sorry, I thought you asked about how to use the SDK resolver that ships with dotnet SDK 🙈 you can force a custom msbuild using these settings https://github.com/OmniSharp/omnisharp-roslyn/pull/1545#issuecomment-510461836
however, 16.6 should be picked before 16.5 - it does so on my machine at least (and the sample you posted also works then), so looks like it’s non deterministic. I will check that
Using instructions at https://github.com/OmniSharp/omnisharp-roslyn/pull/1545#issuecomment-510461836, I inserted the following in
%USERPROFILE%\.omnisharp\omnisharp.jsonto resolve my issue:Also, a minimal installation of VS 2019 Preview with just Roslyn + MSBuild results in:
Can I tell OmniSharp which one to use? I’d rather not have to uninstall the stable version of VS 2019.