Search Unity

VS Code autocomplete not working on a project

Discussion in 'Scripting' started by User340, Aug 30, 2020.

  1. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    VS Code autocomplete is failing on one project specifically. In other projects it works. Any ideas where I might look to fix this problem?
     
  2. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    @HonorableDaniel

    Well it is hard to say what helps when VS Code starts to do that.

    But this is what I've done (maybe take backups before trying):
    - Remove C# project files from the root of the project
    - Close VS Code and restart it from Unity using menu option, not by double clicking

    Also see the debug window in VS Code (I think it is the problems tab) and check if you get errors about OmniSharp or not.

    There is also at least one thread about VS Code not working properly... but I can't find it right now.
     
  3. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    Thanks for the response.

    I've switched to Rider, couldn't be happier!
     
  4. tranos

    tranos

    Joined:
    Feb 19, 2014
    Posts:
    180
    If someone bumps into this post in the future. This may fix it.
     

    Attached Files:

    Last edited: Sep 7, 2020
    djweaver likes this.
  5. djweaver

    djweaver

    Joined:
    Jul 4, 2020
    Posts:
    105
    Nice. I wasn't getting full functionality out of vscode until I changed these settings and did regen. One note, I first got a bunch of errors in the vscode integrated terminal about Omnisharp not being able to load the csproj files... --the solution was to download and install the 4.7.1 .NET Framework SDK and restart vscode.