Search Unity

2019.1a14 Namespace not found in Visual Studio for Mac

Discussion in '2019.1 Beta' started by AnneCHPostma, Jan 26, 2019.

  1. AnneCHPostma

    AnneCHPostma

    Joined:
    Jul 22, 2015
    Posts:
    17
    I want to test Unity 2019.1a14, but when adding a script, the namespaces can't be found in Visual Studio for Mac:

    Screenshot 2019-01-26 at 19.15.59.png

    If I try the same thing with version 2018.3 it is working fine.

    Anyone any idea what might cause this to happen?
     
    delmasli, Jazzer008 and Abbrew like this.
  2. Abbrew

    Abbrew

    Joined:
    Jan 1, 2018
    Posts:
    125
  3. Jazzer008

    Jazzer008

    Joined:
    Jan 16, 2013
    Posts:
    37
    Neither me. I guess I'll have to revert my project and re-download an earlier alpha. Oh wait... :/
     
    Last edited: Jan 29, 2019
  4. Abbrew

    Abbrew

    Joined:
    Jan 1, 2018
    Posts:
    125
    I got it to work a couple days ago, but the steps I took were kinda risky. You probably have Mono 5.16 in your VSCode/VS and Mono 5.18 installed by brew. Go to Preferences -> Project -> .NET Runtimes and you should see Mono 5.16 as the default runtime. That one goes up to 4.7.1 and we need 4.7.2 from Mono 5.18. Click "Add" and locate /usr/local/Cellar/mono/5.18.0.225. Select the 5.18.0.255 folder. If your IDE doesn't allow you to do so, then visit/Library/Frameworks/Mono.framework/Versions/5.16.0 and move (not copy, but move!) 5.16.0 to a safe folder. Now try the first series of steps and you should be able to select 5.18.0 as the default runtime. Once you do so, restore 5.16.0 to its original location, and you now have the option of switching between the two.
     
    GilCat and Jazzer008 like this.
  5. Jazzer008

    Jazzer008

    Joined:
    Jan 16, 2013
    Posts:
    37
    Much appreciated. Simply downloading the latest mono.pkg and updating was enough for my VSC, which now shows default at 5.18.
     
    delmasli likes this.
  6. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    1,410
    Using the preview version of VS4Mac should resolve these issues.

    It's not recommended to mix and match VS 2019 preview-era bits (VS4Mac 8.x and Mono 5.18) with 2017 era-bits (VS4Mac 7.x and Mono 5.16).

    https://visualstudio.microsoft.com/vs/preview/
     
    GilCat and Abbrew like this.
  7. gclsw

    gclsw

    Joined:
    Aug 22, 2017
    Posts:
    5
    Hi,Abbrew. Thank you. I have same problem with you, but I fixed the problem just change .Net runtime on visual studio.