Search Unity

  1. We've closed the job boards. If you're looking for work, or looking to hire check out Unity Connect. You can see more information here.
    Dismiss Notice
  2. We're running great holiday deals on subscriptions, swag and Asset Store packages! Take a peek at this blog for more information!
    Dismiss Notice
  3. Check out our Unite Austin 2017 YouTube playlist to catch up on what you missed. More videos coming soon.
    Dismiss Notice
  4. Unity 2017.2 is now released.
    Dismiss Notice
  5. The Unity Gear Store is here to help you look great at your next meetup, user group or conference. With all new Unity apparel, stickers and more!
    Dismiss Notice
  6. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  7. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  8. Unity 2017.3 beta is now available for download.
    Dismiss Notice

[Solved] Problems with OmniSharp and Visual Studio Code

Discussion in 'External Tools' started by tetriser016, Dec 15, 2016.

  1. tetriser016

    tetriser016

    Joined:
    Jan 3, 2014
    Posts:
    77
    SOLVED: Fixed the problem by reinstalling VS Code and the C# extension.

    I've used Visual Studio Code for few days now to edit my scripts. VSCode was working, before VSCode updates. After the update, OmniSharp fails to validate the Unity project files and the editor refuses to initialize IntelliSense. Is this a bug or my own end? Reinstalled the C# extension but no luck.

     
    Last edited: Jan 22, 2017
  2. EdKirby

    EdKirby

    Joined:
    Nov 15, 2013
    Posts:
    15
    I had to install Mono and it worked for me. http://www.mono-project.com/download/

    I also installed the other Unity related extensions but it was the Mono install that fixed that issue for me.

    Hope this helps.
     
    wenderRondonia likes this.
  3. tetriser016

    tetriser016

    Joined:
    Jan 3, 2014
    Posts:
    77
    @EdKirby - Not working either. Maybe I need to install the 64-bit version of Mono for my 64-bit laptop?
     
  4. EdKirby

    EdKirby

    Joined:
    Nov 15, 2013
    Posts:
    15
    Hey @tetriser016 - Sorry for the very late reply. Hmmm...not sure. My Mac is 64 bit and all I did was download and install Mono from the link I posted above. If there is a 64 bit version perhaps trying that would help.
     
  5. EdKirby

    EdKirby

    Joined:
    Nov 15, 2013
    Posts:
    15
    Oh, I should mention that since the time that I got VSC working I've completely jumped ship and moved to Windows. I'm running Parallels on my MacBook and went with VS Community 2015 and it works very well. I can do proper debugging now. The only issue I've found is when creating a new class, VS Comm 2015 doesn't (always?) make the connection that it's in the project so I don't have all the Unity namespaces and such until I restart VS.

    If you decide to go this route let me know. There are a couple of workflow gotchas you should be aware of.
     
  6. mcpunkylt

    mcpunkylt

    Joined:
    Feb 26, 2014
    Posts:
    4
    Try https://code.visualstudio.com/insiders for me it fixed these issues regarding VSCode and Unity 5.x integration on macOS:
    > No code errors or warnings being indicated.
    > No reference counting, peeking, etc.
     
  7. tetriser016

    tetriser016

    Joined:
    Jan 3, 2014
    Posts:
    77
    Thx, @EdKirby and @mcpunkylt.

    But I develop games on Windows, not macOS. Also, my internet connection just reaches its limit, so I can't download Mono.

    However, I got the latest update for Code after I reinstalling it.

    I got just one question, how can I make Unity find VSCode again after I uninstall it, without reinstalling Unity?
     
  8. EdKirby

    EdKirby

    Joined:
    Nov 15, 2013
    Posts:
    15
    @tetriser016 I haven't tried this but if you go Edit>Preferences then External tools you may be able to either find it in the drop down if Unity discovers it or browse to it manually.
     
  9. tetriser016

    tetriser016

    Joined:
    Jan 3, 2014
    Posts:
    77
    @EdKirby - Thanks, just browsed and located the Code.exe from Unity.
     
  10. tetriser016

    tetriser016

    Joined:
    Jan 3, 2014
    Posts:
    77
    Good news, now OmniSharp runs and successfully validates the Unity project files as it should.

    Code now got the Unity namespaces, but I dunno if this will persist... Thanks,
     
  11. EdKirby

    EdKirby

    Joined:
    Nov 15, 2013
    Posts:
    15
    Kewl.

    Just out of curiosity, since you are on Windows anyway, why don't you use Virtual Studio 2015 Community Edition? It has almost all the same features as VS Pro, is free and (at least for me) it works better than Code.
     
  12. tetriser016

    tetriser016

    Joined:
    Jan 3, 2014
    Posts:
    77
    @EdKirby - Well, I do use VS 2015 Community as well, but my laptop isn't that "beefy" enough to make VS 2015 run faster. That's why I prefer Code.
     
  13. EdKirby

    EdKirby

    Joined:
    Nov 15, 2013
    Posts:
    15
    Ah ok. Makes sense.
     
  14. wenderRondonia

    wenderRondonia

    Joined:
    Mar 15, 2015
    Posts:
    19
    Installing mono also worked for on Linux Ubuntu 16.04 Unity Editor!
     
  15. Seed_Value

    Seed_Value

    Joined:
    Jul 22, 2016
    Posts:
    3
    I have issue in Mac + Unity 5.5 with IntelliSense, codelenses - installing insider version fixed my issue.