Unity 2021 & 2022, assembly references not found.

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 :frowning:

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

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://discussions.unity.com/t/778503

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://discussions.unity.com/t/805330/7

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 :frowning: funnily enough the above posts you’ve sent, I’ve already tried :stuck_out_tongue: beyond that I am unsure how to proceed to be honest.