Open ishc3ice opened 4 years ago
looks like you have an outdated installation of global Mono. please update to at least 6.4 (ideally 6.10)
looks like you have an outdated installation of global Mono. please update to at least 6.4 (ideally 6.10)
I already have Mono 6.10
OmniSharp using global mono :6.10.0
yes but it must be missing the necessary msbuild (16.3+)
~ $ pacman -Q | grep msbuild
mono-msbuild 16.6.xamarinxplat.2020.04.29.14.43-1
I am not very familiar with Arch but we have only partial support for ot though see https://github.com/OmniSharp/omnisharp-roslyn#introduction
what your log shows is that the global mono you have doesn't have correct new msbuild bundled, hence the problem
what you need is the equivalent of mono-devel for Ubuntu
I believe that Arch has a msbuild-stable package that is known to work. See this comment https://github.com/OmniSharp/omnisharp-vscode/issues/3769#issuecomment-630291840
ah thanks @JoeRobich I couldn't find that. I updated the instructions here https://github.com/OmniSharp/omnisharp-roslyn/pull/1859
I replaced mono-msbuild
with msbuild-stable
, and it hasn't changed anything
I can confirm that I'm experiencing this too. msbuild-stable sadly doesn't seem to resolve anything.
This issue also persists on the flatpak version, which can make sense since it seems to be referencing local packages as well.
Pressing F5 seems to be a decent workaround for now as it seems to help highlight actual issues in the code :)
I have this issue on macOS. Using stable mono 6.10, tried 6.12 too, but no go. I can only get OmniSharp 1.23.4 to provide partial IntelliSense for dotnet core projects. It can't handle any references to System.Threading.* using the global mono but it does work if I change to "omnisharp.useGlobalMono": "never"
.
I'd leave it at that but I can't use the never
setting as it is only allowed in user and not workspace. I also use Unity and that requires real mono, the internal Omnisharp version will not function.
Basically, in order to keep working, I can only have one project open at a time and I have to swap the omnisharp.useGlobalMono setting to and from always and never before changing projects. I wish I understood the real issue so I could address it.
the problem is the incompatibility between the lowest MSBuild version required by the new .NET Core SDKs (16.7+) and the version available in any publicly available Mono (16.6)
the bundled Mono of Omnisharp is something we build ourselves so it has 16.8 and hence it works with latest.NET Core including .NET 5.0
you can find more info here https://github.com/OmniSharp/omnisharp-vscode/issues/4007#issuecomment-677405332 and here https://github.com/mono/mono/issues/20250
Thanks so much @filipw! I was able to configure an environment that works for Unity and DotNet Core at the same time with your information.
Here is what I had to do to work in VSCode in both Unity and DotNet core without changing the Omnisharp.useGlobalMono
setting several times a day. The following setup also allows me to have Unity and DotNet Core projects open at the same time.
"Omnisharp.useGlobalMono": "always"
in my VSCode user settings (can't use workspace)
Issue Description
When I open a Project with OmniSharp and the target Framework is set to 2.1, it works perfectly, but if i go higher than that (>= 3.0), it just says "The type or namespace name 'System' could not be found". It works perfectly when I press F5, or do dotnet run
Steps to Reproduce
Create any .NET Core >= 3.0 project and try to use Omnisharp
Expected Behavior
It should work on any .NET Core version
Actual Behavior
It doesn't and can't find any .NET Core classes
Logs
OmniSharp log