Is it possible to prevent VS Code opening the Unity scripts twice?

E.g. I opened Unity project, double clicked a script and got my project (Assets folder) opened in VS Code, now I go to Unity make a few changes and open another script file. The script file opens another instance of the VS Code. I would like to have the file opened in the currently opened instance instead of opening a new one. Is it possible?

enter image description here

enter image description here

Thank you.

  • \$\begingroup\$ all of these problems can be result of not or bad syncing. in these times i just uninstall unity editor and code editor both and reinstall them \$\endgroup\$
    – virtouso
    Aug 24, 2019 at 10:19

1 Answer 1


Thanks to baheard

I believe it was related to upgrading a project to a new version of unity. I resolved it by deleting the .csproj files and the .sln file form the project folder. Unity will just recreated them immediately, and the files correctly opened in the same instance of VS.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .