I’m asking for help because I’ve tried everything but Visual Studio for Mac just does not recognize any unity project of mine. It doesn’t load hierarchy anymore, doesn’t recognize namespaces and doesn’t attach to unity. Here is a bit of context :
I’m on MacOS latest version on a 2019 Macbook Pro,
I’ve tried combining multiple Unity versions (2019, 2020, 2021, 2022) and Visual Studio for MacOS versions (2019 from Unity Hub and 2022 from Microsoft website),
I’ve tried every troubleshooting websites, updating packages, regenerating C# Project files, reactivating Unity Tools, redownloading manually .NET core, deleting files generated by unity then opening C# Project etc…
I’ve tried loading new projects, old projects, and Unity Samples from different Unity versions,
I’ve completely uninstalled Unity and Visual Studio for Mac using an Uninstaller (meaning caches and library folders have been cleaned in the process).
Most common error is that the C-Sharp assembly failed to load but other issues seem to also exist behind as it still didn’t work when I tried load that specific assembly,
All this appeared because I wanted to take a look at Visual Studio for Mac 2022. Once installation was done, all the issues started to appear. I immediately removed it but it was too late even for older versions of both Unity and VS as described above.
Nothing worked and I come here out of despair because I just can’t use Unity anymore with Visual studio for Mac, and I don’t know what to do anymore…
I’ll take any lead you have guys, ty in advance for your time.
Hi @YtsB , I noticed that no one on this thread seemed to have a solid solution to your problem. I know I’m about a year late, but I may have a solution for you.
I recently ran into a similar issue. After I updated my Mac OS, Intellisense just broke and wouldn’t work anymore. I tried to download the newest version of Visual Studio (as of now: 17.5.3 (build 15)) and start over, but that broke both Intellisense and Visual Studio would no longer recognize the Unity libraries.
I was about to give up too, until I found this recent YouTube tutorial that luckily fixed the problem for me. Just look for:
The main things that seemed to resolve the problem for me were downloading Mono and the .NET SDK. I had an older version of Unity than the YouTuber, but her solution still worked for me. Just try following it as far as your version will allow and it should (hopefully) fix your problem. Good luck!
Do you already check that you have Visual Studio as External Script Editor in Unity?
In Unity click: Edit → Preferences → External Tools → External Script Editor and select Visual Studio
My fix was fiddling around with the arguments below the ‘External Script Editor’ option in Preferences/External Tools. Try hitting the ‘Reset argument’ button and uncheck all the boxes under ‘Generate .csproj files for:’ then close VS, hit ‘Regenerate project files’, and open VS. This might not work but you didn’t mention it in the provided context so its worth a shot. Also be sure that mono is fully up to date.
I believe it’s enough just to install from Package Manager the “Visual Studio Editor”, when installing a new Unity is not installed by default. Also it seems to be no longer supported on Mac in the future, so probably in the future just “Visual Studio Code Editor”
you need to reinstall the visual studio then click on unity tab > settings >external tools> external script editor then select visual studio which you have recently installed