Unity insists on opening VSCode instead of Visual Studio 2017

Greetings,

I have both Visual Studio 2017 and VS Code installed on my laptop (I use both for different types of development). I want to use Visual Studio 2017 with Unity because I don’t seem to get intellisense with VS Code like I do with Visual Studio 2017.

I have configured Unity to use Visual Studio 2017

But whenever I try to edit a script it opens VS Code instead.
6093123--661992--upload_2020-7-15_10-39-21.png

How can I force Unity to use Visual Studio instead of VS Code?

I can’t recreate the issue you describe exactly, though I had some similar issues when changing things around to decide between editors initially. For me it resolved simply by making the selection I wanted in preferences, closing the preferences window, and then immediately quitting and restarting Unity.

If that doesn’t work (which I’m assuming it didn’t) - then I would suggest opening up your scripts folder in Finder, then right-clicking on a script and selecting “Get Info” - from there you can check the “Open with:” section to see if C# files are associated with vscode at a system level.

Not sure that’ll be it, but I hope it helps - good luck!

1 Like

Thanks, I am getting inconsistent behavior. Sometimes it opens in vscode and other times in Visual Studio. This will happen even while I’ve already got scripts open in the other.

For instance, I double-click a script in unity and it opens visual studio. I double-click another script in unity and it opens VS code.

Very strange.