I'm having an issue with the mentioned error in several .net core applications. I'm using vs code version 1.18.0 but the error started to appear already in the previous version.
The error appears in every .cs file for every datatype like string, int, void etc. and also for class imports.
All the projects still compile and run properly. Also on another workstation I'm not having the issue in the same projects, so it seems to be a local omnisharp/ vs code or windows? problem.
Has anyone had something like this and managed to fix it or any suggestions on what i could try?
I've reinstalled vs code and omnisharp already, but I'm still having the problem.
example Error: Predefined type 'System.Object' is not defined or imported [GG]
Thanks for sharing your fix. Unfortunately, that didn't work for me. What worked for me is to reinstall the latest OmniSharp.
Copy-pasted from this ticket:
The fix for this has been pushed into OmniSharp. You should be able to get the fix by setting the "omnisharp.path" option in VS Code to "latest". That will cause C# for VS Code to download the latest build OmniSharp at start up.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With