Search Unity

Unable to get VSCode OmniSharp working with Unity

Discussion in 'Linux Editor' started by scplayer1, Mar 9, 2019.

  1. scplayer1

    scplayer1

    Joined:
    Feb 4, 2016
    Posts:
    11
    I've migrated a project from Windows over to Ubuntu and set it up to work with VSCode. However, it seems to have issues with the assembly files. Here is the error:

    Failed to load project file '/home/sc-player/Documents/Unity/Defense/Assembly-CSharp-Editor-firstpass.csproj'.
    /home/sc-player/Documents/Unity/Defense/Assembly-CSharp-Editor-firstpass.csproj
    /home/sc-player/.vscode/extensions/ms-vscode.csharp-1.17.1/.omnisharp/1.32.8/omnisharp/msbuild/15.0/Bin/Microsoft.Common.CurrentVersion.targets(1195,5): Error: The reference assemblies for framework ".NETFramework,Version=v4.7.1" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.

    I've done extensive reading and I cannot fix it, even temporarily, by changing the .NETFramework version. I've tried updating mono as well:
    sudo apt-get install mono-complete
     
  2. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    596
  3. scplayer1

    scplayer1

    Joined:
    Feb 4, 2016
    Posts:
    11
    As I understand it, Mono is a replacement for the .NET Framework, since the framework is only available on windows? If that is the case, how do the versions correspond? The reason I ask is because I can't find this information anywhere. Currently pre-compiling the newest version.

    Edit: That seemed to do it. Thanks, I'm mostly just wondering now how I know this is the correct version
     
    Last edited: Mar 9, 2019
  4. Advis91

    Advis91

    Joined:
    Jun 20, 2017
    Posts:
    29
    In terminal "mono --version" reveals the current mono version. I have 5.18.0.240 and newest seem to be 5.18.0.268.
     
  5. scplayer1

    scplayer1

    Joined:
    Feb 4, 2016
    Posts:
    11
    So the newest version will always be the correct one?
     
  6. Advis91

    Advis91

    Joined:
    Jun 20, 2017
    Posts:
    29