Search Unity

Visual Studio cannot find unity namespaces

Discussion in 'Code Editors & IDEs' started by doganaktay, Apr 9, 2020.

  1. doganaktay

    doganaktay

    Joined:
    Apr 1, 2020
    Posts:
    6
    Hello,

    I've updated (without thinking) into the newest version of Visual Studio on my mac and now VS cannot find the unity namespaces so I can't use any of them. Older projects I created before updating work fine and VS intellisense is working correctly.

    However, whatever new project I build, whether on 2019.3.7f1 or 2019.3.8f1 versions of Unity, VS cannot find the namespaces and I can't use it properly as the external editor.

    The solution I have tried that did not work is removing all the csproj as well as the sln files and having unity rebuild them (by checking the appropriate boxes in Unity preferences). Unfortunately, the problem persists.

    I want to get back to using VS properly with Unity, and will be careful in the future about not updating VS too hastily, however I still need to find a solution to my current predicament.

    Any help would be much much appreciated.

    Thank you
    Dogan
     
  2. miniwolf_unity

    miniwolf_unity

    Unity Technologies

    Joined:
    Apr 10, 2018
    Posts:
    138
    Do you have the visual studio package installed? That may be what is causing your problems.
    It was pulled back for unity 2019.3, but can still lay around in your project. It is only supported for unity 2020.1+.
     
  3. chadfranklin47

    chadfranklin47

    Joined:
    Aug 11, 2015
    Posts:
    229
    Hello, I just updated to Unity 2019.3.12 from an earlier 2019.3 version a few hours ago and I am having a similar problem. Visual Studio can recognize the UnityEngine namespace but not some of my other namespaces from the asset store. I tried removing the Visual Studio Code Editor Package but that hasn't helped. Is there anything else I can do? I have made a new project, same problem. Switched from VS 2017 to VS 2019, same problem.

    I also tried this to no avail: https://answers.unity.com/questions/1697513/vs-code-does-not-find-some-classes-cs0246cs0103.html

    Update: I downgraded my test project to 2019.2.11 and the problem no longer happens. Is there any way I can keep 2019.3 without this issue?
     
    Last edited: May 2, 2020
    si_eta likes this.
  4. miniwolf_unity

    miniwolf_unity

    Unity Technologies

    Joined:
    Apr 10, 2018
    Posts:
    138
    chadfranklin47 likes this.
  5. chadfranklin47

    chadfranklin47

    Joined:
    Aug 11, 2015
    Posts:
    229