VsCode with Mac

Hi all,
I’ve been struggling with this for the past week or so. I got an M2 MacBook Air and wanted to develop with Unity on it. I found that Visual Studio is shutting down for Mac, so I have to use VSCode. I have been able to set it up flawlessly up to the point of getting DotNet to work. I’ve tried versions 5-8, both ARM and Intel versions, but can’t get VSCode to recognize the installs. I also can’t get IntelliSense to work. I have deleted the /usr/local/share/dotnet folder to do fresh installs of DotNet, but still no resolution. The attached image is a picture of VSCode right after a fresh install and restart of the Mac. I have been able to get it to work temporarily, but after closing the project, it’s as if VSCode doesn’t recognize the DotNet install. If anyone has answers on how to fix this permanently, please let me know. I don’t like having to reinstall DotNet every time I want to code.

Should never need that noise… it might even be causing your issues, who knows. Generally the less software you install the better.

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 package inside of Unity: Window → Package Manager → Search for Visual Studio Editor → Press the Update button

Depending on flavor and version of Visual Studio, it may also have an installation step that you perform within the actual Visual Studio. This step seems finicky at best and may require multiple openings of VS before it comes up.

Update: The VSCode extension has been deprecated and abandoned:

https://discussions.unity.com/t/886480

Update: the VSCode integration is back… maybe!?

https://discussions.unity.com/t/925353

There may be a community fork available that is receiving updates.

https://github.com/Chizaruu/com.tsk.ide.vscode

Also, this: https://discussions.unity.com/t/805330/7

Recently (July 2023) I worked on a Windows11 system that required a Microsoft component to be installed from within Visual Studio before it would work properly with all the OTHER software installed under Unity. I have no documentation on that process as I have only seen it once and it surprised me as well.

1 Like

Thanks for those links, I appreciate you.

1 Like

after omnisharp closesourced, you need to Install Visual Studio For Mac and from Unity Package Manager Visual Studio Editor even if you dont use it. Side note while installing Visual Studio For Mac, Install .Net Framework, should be an option there.

After that, you need some extensions on VSCode which I’m listing here:

  • .Net Install Tool
  • C#
  • C# Dev Kit
  • Unity

After all this, it should work.