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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug Unity 2021 & 2022, assembly references not found.

Discussion in 'Editor & General Support' started by Shanks37, Sep 3, 2022.

  1. Shanks37

    Shanks37

    Joined:
    Jul 23, 2020
    Posts:
    2
    Hi all, I've ran into this issue in the past and have fixed it rather easily using various techniques people have suggested but I think this time it may have the better of me :(

    So it initially started on my team members computer where there assembly references couldn't be found such as TMPro & UnityEngine.UI, I started by ensuring their editor was set to use visual studio 2019 and the appropriate packages where ticked along with regenerating their files, this didn't work so we updated to visual studio 2022, it and it fixed it self, but once they gave me the script it basically corrupted all of my work like a virus... and i started encountering the issue.

    Things that I've tried.
    • Ensuring unity 2021 LTS is up to date.
    • I installed the latest version of unity.
    • Ensuring visual studio 2022, is up to date.
    • I downgraded visual studio to 2019 and tried again.
    • Made sure the visual studio packages where up to date.
    • I uninstalled and reinstalled the visual studio packages
    • I deleted all of the CSJPRO
    • I uninstalled and reinstalled all versions of unity and visual studio.
    This appears to be a VS issue not a unity issue as Unity executes and runs the scripts as expected, but visual studio just cannot read the namespaces.

    Thank you! Shanks37
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,970
    VS integration is really flaky.

    This may help you with intellisense and possibly other Visual Studio integration problems:

    Sometimes the fix is as simple as doing Assets -> Open C# Project from Unity. Other times it requires more.

    Other times it requires you also nuke the userprefs and .vsconfig and other crufty low-value high-hassle files that Visual Studio tends to slowly damage over time, then try the above trick.

    Barring all that, move on to other ideas:

    https://forum.unity.com/threads/intellisense-not-working-with-visual-studio-fix.836599/

    Also, try update the VSCode package inside of Unity: Window -> Package Manager -> Search for Visual Studio Code Editor -> Press the Update button

    Also, this: https://forum.unity.com/threads/no-suggestions-in-vscode.955197/#post-6227874
     
  3. Shanks37

    Shanks37

    Joined:
    Jul 23, 2020
    Posts:
    2
    Hi @Kurt-Dekker!

    It would appear you've dealt with this issue a lot in the past! hah

    Thank you for your quick reply, all of the above recommendations didn't seem to help :( funnily enough the above posts you've sent, I've already tried :p beyond that I am unsure how to proceed to be honest.