Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

unity does not open Visual Studio 2019 when double click script

Discussion in 'Scripting' started by leegod, Oct 17, 2020.

  1. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,307
    Unity newest version, 2020.1.9f1

    Visual studio community 2019 16.7.6 version

    When double click unity's script, does not open visual studio, nothing happen.

    Preference-external tools-external script editor is set to Visual studio 2019 (Community),

    no matter what 3 options from Visual studio.... neither works.

    now what?
     
  2. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,307
    for test, I deleted Library folder and all .sln, .csproj files, re open unity,

    still can't open script and debug window error says,


    Exception thrown while invoking [OnOpenAssetAttribute] method 'SyntaxTree.VisualStudio.Unity.GeneratedAssetOpener:OpenScript (int,int)' : TypeLoadException: Could not resolve type with token 01000004 (from typeref, class/assembly SyntaxTree.VisualStudio.Unity.Bridge.ScriptAssetOpener, SyntaxTree.VisualStudio.Unity.Bridge, Version=2.8.2.0, Culture=neutral, PublicKeyToken=null)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)
     
  3. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,307
    Just re opened unity, no more above error, but still can't open script from unity. (except via [open by file extension] option), but this option is not preferable.
     
  4. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,307
    no fundamental solutions?
     
  5. TheOtherUserName

    TheOtherUserName

    Joined:
    May 30, 2020
    Posts:
    136
    Maybe you haven't assigned it in the external tools? Edit=>Prefrences=>External Tools and change it there
     
  6. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,307
    of course I did and changed everything
     
  7. LordDarkenon

    LordDarkenon

    Joined:
    Sep 26, 2017
    Posts:
    16
    I have the same issue on Unity 2019.4.13f1 (I didn't have the issue in 2019.3.x).
     
  8. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,697
  9. WizzGames

    WizzGames

    Joined:
    Sep 16, 2020
    Posts:
    4
    Yeah, I was just about to report this as a bug myself. I also have same issue in version in Unity 2019.4.13f1

    A workaround to open the script is to click on the 3 dots to the right of the script component and then select "edit script".
     
    Kurt-Dekker likes this.
  10. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,307
    new errors, unity 2020.2.1f1 error.

    Exception thrown while invoking [OnOpenAssetAttribute] method 'SyntaxTree.VisualStudio.Unity.GeneratedAssetOpener:OpenScript (int,int)' : TypeLoadException: Could not resolve type with token 01000004 (from typeref, class/assembly SyntaxTree.VisualStudio.Unity.Bridge.ScriptAssetOpener, SyntaxTree.VisualStudio.Unity.Bridge, Version=2.8.2.0, Culture=neutral, PublicKeyToken=null)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)

    I did everything about this but still not resolved. help please.
     
  11. MaxxDelusional

    MaxxDelusional

    Joined:
    Jul 16, 2020
    Posts:
    1
    This workaround did not work for me.