Issue: Visual Studio Community 2019 for Mac: Opens new instance every time

When using Visual Studio Community 2019 for Mac with Unity, Unity is opening a new VS editor every time I open the C# project / open a script from Unity. Each new instance will open all previously opened tabs, plus the newly opened file.

The project is working correctly with intellisense, etc. within VS itself.
Visual Studio for Mac [8.7.7] is selected as the External Script Editor

Things I have tried:

  • Deleting all .csproj, .sln files, .vs folder and letting Unity regenerate them
  • Reopening everything, restarting
  • Various satanic rituals

Versions:

macOS 10.15.6
Unity: 2020.1.5f1
Visual Studio Editor package: 2.0.3
Visual Studio Community 2019 for Mac 8.7.7
Visual Studio for Mac Tools for Unity: 2.7.0.0

1 Like

I had same issue. Don’t know what caused it but I did what you did to no avail.

interesting side note, I changed the default code editor to sublime text and same issue. Unity kept on opening a new instance of sublime.

All my other unity projects behaved correctly.

I was unable to fix the problem so I created a new project, imported all assets and copy pasted all my components prefabs scripts into new project and moved on from there.

Lost a day in productivity but at least I’m back to work on my game.

@marnsmith @MitchStan

Hey, sorry the issues! Check the Unity Editor > Preferences > External Tools settings. Make sure that VS for Mac is selected as the external editor.

If that looks good, please use the Help > Report a Problem menu to file an issue so our team can review and resolve. Thanks!

In my particular case the issue affected both visual studio and sublime text. So that would tell me it’s a Unity problem.

I read many many threads about how to remedy it and nothing worked.

The most efficient course of action for me was to throw in the towel and just make a new project.

Unfortunately the issue persists for me even with new projects.

I tried submitting a Visual Studio issue as you suggested, but it hasn’t given me a confirmation. How do I submit a bug report for the bug reporter? :slight_smile:

Thanks!

Finally…this worked for me with 2020.1.5f1.

  • Remove the “Visual Studio Editor” package.
  • Close Unity
  • Remove sln and csproj files.
  • Reopen Unity.

Preferences: External Tools are back to default.