Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Unity insists on opening VSCode instead of Visual Studio 2017

Discussion in 'Code Editors & IDEs' started by MidniteOil, Jul 15, 2020.

  1. MidniteOil

    MidniteOil

    Joined:
    Sep 25, 2019
    Posts:
    345
    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
    upload_2020-7-15_10-38-32.png

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

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

    commmon

    Joined:
    Apr 17, 2020
    Posts:
    2
    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!
     
    MidniteOil likes this.
  3. MidniteOil

    MidniteOil

    Joined:
    Sep 25, 2019
    Posts:
    345
    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.