Visual Studio Unable to Attach to Unity

I updated my Unity, and now when I launch a script through Unity and my visual studio opens, the “Attach to Unity” button disappears and is replaced with “Start”, meaning every time I want to push my code to the Unity editor I have to restart visual studio. I was wondering if any of you have had this issue before and know how to fix it.

Try first closing Visual Studio, then in Unity, navigate to:
Edit > Preferences > External Tools

Under where you have Visual Studio set as your editor, click on the “Regenerate project files” button.

That fixed it! Thank you

1 Like