Search Unity

setup Visual Studio Code on Linux

Discussion in 'Code Editors & IDEs' started by Garzec, Jun 15, 2019.

  1. Garzec

    Garzec

    Joined:
    Mar 3, 2016
    Posts:
    151
    Hi I am working on Manjaro (Linux) and installed the "dotnet" packages via package manager. After that I installed the C#, C# FixFormat, Debugger for Unity, Unity Code Snippets and Unity Tools extensions via Visual Studio Code.

    I would like to achieve the same as I would do with Visual Studio ... if possible? ...

    So I am missing some features (sometimes I have some trouble describing the problem):

    - When I press F12 on a class, I get no definition. Dependencies are not recognized. "I can't jump to other files"
    - The code format behaves like a default text editor. When creating a new method I have to indent the braces myself.
    - VSC knows some Unity methods like "OnTriggerEnter" but not everything. For example namespaces are missing completely (e.g. using UnityEngine).
    - It's lacking full Intellisense support.

    I also get the warning "Some projects have trouble loading. Please review the output for more details" which leads to these warnings / errors

    So how did you setup your VSC? What am I missing?

    Help would be really awesome because I don't want to pay for Rider if I don't have to..
     
    CahVideogames and LilWiebe like this.
  2. CahVideogames

    CahVideogames

    Joined:
    Aug 14, 2018
    Posts:
    1
    I had the same problem ad after two days I solved it.

    Unfortunately .NET Framework is available only for Windows and the only way to replace it is by Installing Mono: https://www.mono-project.com/

    After you do that, close VS Code and reopen it, and the project should load without any problems.

    All of this because of Microsoft, and I'm using Ubuntu. Oof.
     
    Last edited: Sep 8, 2019
    MrGreenish likes this.
  3. poiterwilson

    poiterwilson

    Joined:
    May 31, 2018
    Posts:
    1
    Hi,

    There is an extra step, once you have installed Mono you need to update your VS Code C# extension settings to: Omnisharp: Use Global Mono = Always
     
  4. Xeraster

    Xeraster

    Joined:
    Nov 6, 2014
    Posts:
    4
    This doesn't work anymore. They removed the use global mono setting from vscode.
     
    Eloszek1 likes this.