Hello, I really need help…
Last Friday everything was perfectly working.
I’ve shutdown my PC, and today Intellisense in VSCode does not work anymore… !!!
I’ve tried to open old projects, create new ones, … nothing.
I’ve regenerated project files, opened “C# project”, … nothing.
I had many issues with Intellisense many months ago, but now it was working… until today! :((((
Please could you help me on it?
Many thanks!
It’s the same blurb as always…
This may help you with intellisense and possibly other Visual Studio integration problems:
Sometimes the fix is as simple as doing Assets → Open C# Project from Unity. Other times it requires more.
Other times it requires you also nuke the userprefs and .vsconfig and other crufty low-value high-hassle files that Visual Studio tends to slowly damage over time, then try the above trick.
Barring all that, move on to other ideas:
Also, try update the VSCode package inside of Unity: Window → Package Manager → Search for Visual Studio Code Editor → Press the Update button
Also, this: No suggestions in Vscode
There’s a dedicated forum for this kind of stuff as a sub-forum here: Unity Engine - Unity Discussions
I’ll move your post for you.
Assets → Open C# Project from Unity
does not work…
I’ve tried to install an older OmniSharp version of VSCode,… nothing…
What is really weird is that I don’t have any “Failed to load project file” message in the VSCode terminal… :(((((((((
********* EDIT ***********
After hours, I’ve tried to downgrade OnmiSharp version to 1.23.0, and now finally It’s quite working, but for example UnityEngine.UI is not recognized…
Reading on the Forum I’ve find this:
“It turns out that for me the problem was that OmniSharp looks into the path {PROJECT}\Temp\UnityVS_bin\Debug in order to locate the assemblies but for whatever reason they became empty. To solve this, I opened the project solution in regular Visual Studio (I used VS Express 2017) and rebuilt the solution (you might not need to do the rebuild). This caused a whole bunch of files (including assemblies) to be created in {PROJECT}\Temp\bin\Debug. I simply copied all of this to {PROJECT}\Temp\UnityVS_bin\Debug, then I reloaded the workspace in VS Code (CTRL + SHIFT + P, then type Reload and select “Developer: Reload Window”), and everything worked fine for me!”
It’s exactly what is happening to me… but I never used Visual Studio.
Please could someone tell me ho to rebuild the solution in Visual Studio?
I’ve launched the project in Visual Studio, but what I get is this…
I don’t think visual studio can do that. Unity informs visual studio what the files are that are in the project.
Ok, so, why OmniSharp (at least in version 1.23.x) is looking to the folder “…\Temp\Bin\Debug”, while this folder is empty?
Please note that more recent OmniSharp versions are not working anymore for me (for some unknown reasons)
****** EDIT ******
I’ve reinstalled the OmniSharp version 1.24.1, and now magically everything is working again!!!
I’m happy, but I’d really would like to understand what happened
Same issue here. I tried cleaning vscode files, regenerating project files… nothing fixed. After checking here tried @danielesuppo suggestion and downgraded to C# Omnishar extension in Visual Studio Code to v1.24.4 and magically worked again (tried to upgrade again to 1.25.0 but didn’t work so I’ll stick to 1.24.4 for a while)
Thanks!
Glad to hear that I’m not the only one with this issue!
Anyway, we’ve fixed it, though we don’t know how
Maybe, someday, someone we’ll tell us exactly what’s working on, so to prevent other bad issues like this one
This seems to be the issue: vscode-csharp/README.md at main · dotnet/vscode-csharp · GitHub
Excellent catch. Adding
"omnisharp.useModernNet": false,
to my VSCode settings.json
and restarting VSCode did the trick.
VSCode will no longer be supported by Unity in the future. It’d be best to either take custody of the plugin via a community fork or start migrating off the platform: https://github.com/Unity-Technologies/vscode-unity-debug/issues/206#issuecomment-1141289744
This has happened again… downgrade C# plugin to previous
If you are using the new Unity VSCode extension, you should NOT downgrade C# extension.
We have a dedicated thread here:
https://github.com/microsoft/vscode-dotnettools/issues/329