Search Unity

Question HELP! VSCode Intellisense stopped working (Again!...)

Discussion in 'Code Editors & IDEs' started by danielesuppo, May 25, 2022.

  1. danielesuppo

    danielesuppo

    Joined:
    Oct 20, 2015
    Posts:
    331
    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!
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,705
    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:

    https://forum.unity.com/threads/intellisense-not-working-with-visual-studio-fix.836599/

    Also, try update the VSCode package inside of Unity: Window -> Package Manager -> Search for Visual Studio Code Editor -> Press the Update button

    Also, this: https://forum.unity.com/threads/no-suggestions-in-vscode.955197/#post-6227874
     
  3. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,459
  4. danielesuppo

    danielesuppo

    Joined:
    Oct 20, 2015
    Posts:
    331
    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... :( :( :(

     
    Last edited: May 25, 2022
  5. danielesuppo

    danielesuppo

    Joined:
    Oct 20, 2015
    Posts:
    331
    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...
     
  6. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,705
    I don't think visual studio can do that. Unity informs visual studio what the files are that are in the project.
     
  7. danielesuppo

    danielesuppo

    Joined:
    Oct 20, 2015
    Posts:
    331
    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
     
    Last edited: May 25, 2022
  8. fegabe

    fegabe

    Joined:
    Jan 3, 2015
    Posts:
    18
    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!

    upload_2022-5-25_19-43-51.png
     
  9. danielesuppo

    danielesuppo

    Joined:
    Oct 20, 2015
    Posts:
    331
    Glad to hear that I'm not the only one with this issue!
    Anyway, we've fixed it, though we don't know how o_O
    Maybe, someday, someone we'll tell us exactly what's working on, so to prevent other bad issues like this one
     
  10. _Adriaan

    _Adriaan

    Joined:
    Nov 12, 2009
    Posts:
    481
  11. tmoliter

    tmoliter

    Joined:
    Nov 11, 2020
    Posts:
    1
    FariAnderson and orreborre like this.
  12. pillowfightio_conrad

    pillowfightio_conrad

    Joined:
    Mar 4, 2017
    Posts:
    10
    shoopi and ujz like this.
  13. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    833
    This has happened again... downgrade C# plugin to previous

     
  14. sailro

    sailro

    Microsoft

    Joined:
    Jul 30, 2014
    Posts:
    167