Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Visual Studio 2019 can't compile external assets.

Discussion in 'Scripting' started by mrCharli3, May 3, 2020.

  1. mrCharli3

    mrCharli3

    Joined:
    Mar 22, 2017
    Posts:
    956
    Attaching Visual Studio 2019 to Unity is my main way of debugging, for some reason this has stopped working. When it tries to compile it complains on all external assets scripts that it cannot find dependencies.

    The project compiles fine inside Unity. Is this some error introduced in latest version (2019.3.12)? I've never had this issue before.

    Simply building the solution inside Visual studio does not work either, same errors, which makes sense. Hoping someone has run into this before...

    upload_2020-5-3_14-31-8.png
     
    Last edited: May 3, 2020
    KarlKarl2000 likes this.
  2. matkoniecz

    matkoniecz

    Joined:
    Feb 23, 2020
    Posts:
    170
    What is the exact error message? Always post an exact error message.
     
    KarlKarl2000 likes this.
  3. mrCharli3

    mrCharli3

    Joined:
    Mar 22, 2017
    Posts:
    956
    Posted, like I said only external assets complaining, seems to be the ones that visual studio counts as being in other projects. All the references it is complaining about exist, I can go to each class and look, still Visual Studio does not recognise them.
     
    KarlKarl2000 likes this.
  4. andrewpey

    andrewpey

    Joined:
    Sep 21, 2014
    Posts:
    10
    Can confirm this, since 2019.3.12, Visual Studio solution no longer compiles, spitting ton of referencing errors. Quick Actions menu suggests to reference Firstpass assembly, but it doesn't fix anything. As a result, IntelliSense is broken and no debugging is available.

    At the same time, Unity Editor not showing any errors, and a project can be played without any issue.

    Same project on 2019.3.11 works with Visual Studio as expected.

    Related thread: https://answers.unity.com/questions/1725203/visual-studio-cant-reference-to-firstpass-assembly.html
     
    KarlKarl2000 likes this.
  5. arminelec

    arminelec

    Joined:
    Jul 16, 2015
    Posts:
    4
    I can confirm the same issue after upgrading to 2019.3.12.
    I upgraded my projects to 2019.3.13 and the issue is resolved.
     
  6. TobyKaos

    TobyKaos

    Joined:
    Mar 4, 2015
    Posts:
    212
    same here. Visual studio projet are ignored. Some namespace not found for external assets.