Search Unity

VSCode

Discussion in 'Linux' started by MrMetwurst2, Sep 9, 2015.

  1. MrMetwurst2

    MrMetwurst2

    Joined:
    Jul 16, 2009
    Posts:
    253
    Has anybody got the Linux version working properly with VSCode.
    I can link my .sln and open up the files with context editing inside VSCode, but opening from Unity doesn't seem to work as you'd expect. It will open VSCode, but doesn't open the file and line you select.

    Here's my setup that apparently works on Mac. Any ideas?
     

    Attached Files:

  2. CutlerHeman

    CutlerHeman

    Joined:
    Sep 9, 2015
    Posts:
    1
    Hello!

    Trying removing the " " so that it is only $(file). This worked for me!

    Hope this helps!
     
  3. XGundam05

    XGundam05

    Joined:
    Mar 29, 2012
    Posts:
    473
    [Not a Unity issue] Out of curiosity, has anyone got Omnisharp to actually provide Intellisense in VSCode on Linux? I kept getting a Mono version error (it complained about needing 3.1.x and higher, I have 3.2.x installed). So for now I'm back on Atom.
     
  4. Chaoseiro

    Chaoseiro

    Joined:
    Aug 28, 2013
    Posts:
    40
    I know this is not an Unity issue but argh....
    How did you manage to make it work? I've tried to manually load the project into VSCode and edit the project settings and also tried to use the VSCode Unity plugin, but everytime VSCode will find the solution and won't activate Omnisharp... The "flame" icon just keeps flashing, indicating it is loading the solution, but it never loads it... I've even let it running for 6 hours! to see if it managed to load but nope...
    I know both projects are new, but seeing people manage to make it work gave me hope :p
    Sorry if this is not the place for this but, please, if someone could explain how to correctly set both Unity Linux and VSCode I believe many people will be happy :)
     
  5. cra0zy

    cra0zy

    Joined:
    Sep 30, 2014
    Posts:
    29
  6. Chaoseiro

    Chaoseiro

    Joined:
    Aug 28, 2013
    Posts:
    40
    Interesting, could you please share those modifications, or at list point me to what needs to be changed? Also, for some reason VSCode does not load my solution files, did you also face this problem until you changed the plugin script?
    Thanks!
     
  7. cra0zy

    cra0zy

    Joined:
    Sep 30, 2014
    Posts:
    29
  8. Chaoseiro

    Chaoseiro

    Joined:
    Aug 28, 2013
    Posts:
    40
    Thank you very much for the code. I didn't know about [PreferenceItem], good to know that :)
    Anyway, it seems I have a problem somewhere, as my VSCode just does not load any solution file, neither Unity's, nor XNA nor any *.sln. I'm probably missing some dependency here, didn't find it yet...
    But thank you very much for the modified code :)
     
  9. cra0zy

    cra0zy

    Joined:
    Sep 30, 2014
    Posts:
    29
    Load it manually, once you open the project folder, open any cs file, look at bottom left, click on "[burning icon] X projects" and select csproj to load.

    Tho .sln files aren't loadable, but they are just a collection of .csproj files anyway.
     
  10. Chaoseiro

    Chaoseiro

    Joined:
    Aug 28, 2013
    Posts:
    40
    Yep, I did that, but the flame icon just keeps flashing after selecting a solution file:

    [Edit] Just adding that I've already tried letting the editor try to load the solution, I let it ran for 6h but it just kept flashing :D
     
  11. rakkarage

    rakkarage

    Joined:
    Feb 3, 2014
    Posts:
    683
    View->Toggle Output->OmniSharp Log
    should tell you why OmniSharp is failing...
     
  12. cra0zy

    cra0zy

    Joined:
    Sep 30, 2014
    Posts:
    29


    Disregard the "Launch New Instance" thingy, it's just a script I wrote so I can use system MonoDevelop instead of the one they provided.
     
  13. rakkarage

    rakkarage

    Joined:
    Feb 3, 2014
    Posts:
    683
  14. Chaoseiro

    Chaoseiro

    Joined:
    Aug 28, 2013
    Posts:
    40
    Thank you all for trying to help me :)

    By now I believe you all think I'm dumb, and oh boy how right you are...

    In short, Ubuntu has Mono version 3.12 in its repositories. I've forced the upgrade to the latest version (4.0.4) and that did the trick...
    Sorry for making you lose time over such stupid non-unity related issue...

    [Edit] If you have a similar problem, upgrade Mono: http://www.mono-project.com/docs/getting-started/install/linux/