Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice

Visual studio 2017 no longer opens in a13

Discussion in '2019.2 Beta' started by Snorkel, Apr 25, 2019.

  1. Snorkel

    Snorkel

    Joined:
    Dec 3, 2012
    Posts:
    36
    When I double click a script or error it no longer opens Visual Studio 2017 in a13.

    Happens in a fresh project & in upgraded ones, still works on a9.

    There is no error when double clicking on files, nothing happens.

    There is an error when right clicking and doing open C# project.

    ArgumentException: The specified path is not of a legal form (empty).
    System.IO.Path.InsecureGetFullPath (System.String path) (at <23c160f925be47d7a4fd083a3a62c920>:0)
    System.IO.Path.GetFullPathInternal (System.String path) (at <23c160f925be47d7a4fd083a3a62c920>:0)
    System.IO.FileInfo.Init (System.String fileName, System.Boolean checkHost) (at <23c160f925be47d7a4fd083a3a62c920>:0)
    System.IO.FileInfo..ctor (System.String fileName) (at <23c160f925be47d7a4fd083a3a62c920>:0)
    (wrapper remoting-invoke-with-check) System.IO.FileInfo..ctor(string)
    VisualStudioEditor.VSEditor.OpenProject (System.String path, System.Int32 line, System.Int32 column) (at Library/PackageCache/com.unity.ide.visualstudio@1.0.3/Editor/VSEditor.cs:373)
    UnityEditor.CodeEditorProjectSync.OpenProjectFileUnlessInBatchMode () (at C:/buildslave/unity/build/Editor/Mono/CodeEditor/CodeEditorProjectSync.cs:52)
    UnityEditor.CodeEditorProjectSync.SyncAndOpenSolution () (at C:/buildslave/unity/build/Editor/Mono/CodeEditor/CodeEditorProjectSync.cs:44)
     
    Eyon_game likes this.
  2. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    4,185
    Same thing for me, imported project and I tried to create a new script, no reaction when I double click on a script. Preferences are set on Visual Studio 2017.

    Did you file a bug report?

    Error message:
     
    Eyon_game likes this.
  3. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    4,185
    I tried again after deleting the .csproj and .sln files; after double clicking on a script, the files are recreated but VS doesn't open.

    In case this would be related to a certain bug with the Hub, I loaded another project made with 2019.1.0f2: VS starts when I double click on a script.
     
  4. Snorkel

    Snorkel

    Joined:
    Dec 3, 2012
    Posts:
    36
    I did now, using editor report issue.
    (I'm not getting a confirmation email, so I'm not sure it worked.)
     
  5. Snorkel

    Snorkel

    Joined:
    Dec 3, 2012
    Posts:
    36
    ok, just took a while.
    Ticket is open on FogBugz Case 1149180
     
  6. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,007
    There's already an update to the com.unity.ide.visualstudio package (1.0.3 -> 1.0.4), have you tried upgrading to that?
     
  7. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    4,185
    I've noticed these packages, why do we need additional VS packages now?

    I did install the update: no changes.

    I removed:
    • Rider editor,
    • VS Code editor,
    • VS Editor,
    and deleted the .csproj and .sln files: no changes either except that the .csproj and .sln are not recreated when I double-click on a script.

    I just noticed that, after deinstalling the packages and double-clicking on a script, VS studio runs in the task manager but doesn't display on the screen.

    I'm deinstalling 2019.2.0a13; there is no point in keeping it if I cannot use it.
     
    Last edited: Apr 26, 2019
  8. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    4,185
    Now that I have deinstalled 2019.2.0a13, I cannot install the previous version; Unity Hub v.2 beta doesn't propose it.

    Capture.JPG
     
  9. Snorkel

    Snorkel

    Joined:
    Dec 3, 2012
    Posts:
    36
    I got a reply, the issue is fixed in next package which is not yet released.
    They don't know when that package will be available.
    So reverting back to older version seems to be only option for now.
     
    GilCat and APSchmidt like this.
  10. DavoMyan

    DavoMyan

    Joined:
    Jan 5, 2017
    Posts:
    27


    Thanks, I was freaking out, I have the same issue
     
  11. rmb303

    rmb303

    Joined:
    Jan 6, 2016
    Posts:
    24
    I've just downloaded alpha14, hoping that this had been fixed, but it's not.
    Unity's almost unusable without easily being able to edit scripts in a decent application.
     
  12. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,007
    Alpha for a reason, just downgrade.

    Rider works fine though by the way.
     
  13. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,123
    I haven't noticed this on my end. Right now I'm on Visual Studio Editor 1.0.6 package with a14, things works properly. Pretty sure VS worked for me on some earlier VS package on a13 as well.
     
  14. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    428
    Last alpha. Have this error:
    Code (JavaScript):
    1. Unable to find bridge dll in registry for Microsoft Visual Studio Tools for Unity for C:/Program Files/Unity2017/MonoDevelop/bin/MonoDevelop.exe
    2. UnityEngine.Debug:Log(Object)
    3. VisualStudioEditor.VSInitializer:InitializeVisualStudio(String, Dictionary`2) (at Library/PackageCache/com.unity.ide.visualstudio@1.0.6/Editor/VSInitializer.cs:107)
    4. VisualStudioEditor.VSInitializer:Initialize(String, Dictionary`2) (at Library/PackageCache/com.unity.ide.visualstudio@1.0.6/Editor/VSInitializer.cs:23)
    5. VisualStudioEditor.VSEditor:Initialize(String) (at Library/PackageCache/com.unity.ide.visualstudio@1.0.6/Editor/VSEditor.cs:373)
    6. Unity.CodeEditor.CodeEditor:SetExternalScriptEditor(String) (at C:/buildslave/unity/build/Editor/Mono/CodeEditor/CodeEditor.cs:154)
    7. UnityEditor.PreferencesProvider:AppsListClick(Object, String[], Int32)
    8.  
    Using Mono Behavoir perfectly before that. Hate this.
     
    Last edited: May 2, 2019
    angelonit likes this.
  15. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    4,185
    It didn't for me either.

    What's that?
     
  16. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    4,185
    Same thing for me. The only way to open VS is:
    1. right-clicking on the script in the project window,
    2. selecting "Show in Explorer",
    3. once located in the explorer, open it.
    Unfortunately, after opening the scripts using that method, intellisense doesnt work...
     
    ChristophGeske likes this.
  17. DavoMyan

    DavoMyan

    Joined:
    Jan 5, 2017
    Posts:
    27

    This actually doesn't work for me, trying to open a .cs file (double clicking it) doesn't open, it's set to open with Visual Studio, I've tried everything (run as administrator, right click open with) nothing works. Only opens with notepad
     
  18. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    4,185
    Still investigating:

    1. created a brand new project in 2019.2.0a14,
    2. created a script that I called Test,
    3. double-clicked on the script in the editor: doing this creates the .csproj and .sln files in the main directory but it doesn't create the hidden .vs folder,
    4. right-clicked on the script in the editor and selected "Open C# Project": doing this generates the following error message in the console.
    Error message:
    Code (CSharp):
    1. ArgumentException: The specified path is not of a legal form (empty).
    2. System.IO.Path.InsecureGetFullPath (System.String path) (at <23c160f925be47d7a4fd083a3a62c920>:0)
    3. System.IO.Path.GetFullPathInternal (System.String path) (at <23c160f925be47d7a4fd083a3a62c920>:0)
    4. System.IO.FileInfo.Init (System.String fileName, System.Boolean checkHost) (at <23c160f925be47d7a4fd083a3a62c920>:0)
    5. System.IO.FileInfo..ctor (System.String fileName) (at <23c160f925be47d7a4fd083a3a62c920>:0)
    6. (wrapper remoting-invoke-with-check) System.IO.FileInfo..ctor(string)
    7. VisualStudioEditor.VSEditor.OpenProject (System.String path, System.Int32 line, System.Int32 column) (at <702b024648ec477ebb75a2597cc68f30>:0)
    8. UnityEditor.CodeEditorProjectSync.OpenProjectFileUnlessInBatchMode () (at C:/buildslave/unity/build/Editor/Mono/CodeEditor/CodeEditorProjectSync.cs:52)
    9. UnityEditor.CodeEditorProjectSync.SyncAndOpenSolution () (at C:/buildslave/unity/build/Editor/Mono/CodeEditor/CodeEditorProjectSync.cs:44)
     
    Last edited: May 2, 2019
  19. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    4,185
    Nobody from the development team commented on this. @LeonhardP ?
     
    id0 likes this.
  20. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    4,185
    As a follow up, I installed Visual Studio 2019: same problem exactly...

    No problem when I use Visual Studio 2019 with 2019.1.0f2.
     
  21. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    4,185
    To finish with, I didn't install Visual Studio on the C drive; it's installed on an external SSD.
     
  22. DavoMyan

    DavoMyan

    Joined:
    Jan 5, 2017
    Posts:
    27

    Yes I'm getting the same error. My VS is on my C drive.
     
  23. miniwolf_unity

    miniwolf_unity

    Unity Technologies

    Joined:
    Apr 10, 2018
    Posts:
    104
    First of all sorry for all these troubles this new alpha release is causing. Second of all thank you soo much for trying out this alpha, it is really great to see. I am the single developer of these packages, and I can assure you that you are not the first to hit these problems. Also that they have already been fixed, there are a lot of information here, so let me try to boil the questions I see down:

    Is my Visual Studio installation the problem?
    • No
    Why do we need additional VS packages now?
    • These new packages, solve a few different problems. First of all it allows us to iterate independently of Unity releases. Meaning that potentially we can fix the issues faster than the alpha releases are pushed out. (That is the theory)
    • Secondly it allows for different ways of collaborating with the code base, and will i.e. make it possible for removing the Rider Plugin that gets force installed into users Assets/Plugin folder, among other things, as we are now targeting the public API (this is how packages work)
    How do we solve ArgumentException: The specified path is not of a legal form (empty).
    • By updating to the new release of the packages. com.unity.ide.visualstudio@1.0.3 had this specific problem, and this was fixed in 1.0.4.
    How do we get new versions of the packages?
    • Either you wait for the new alpha release to be shipped. Or you manually update the package through the Package Manager UI, which can be found under the menu Window/Package Manager.
    I hope this resolves most, if not all of your problems.

    Side note: the problem I see with MonoDevelop is not something I have seen before, so I will have to fix that in an upcoming patch release, sorry for the inconvenience.
     
    Ryiah likes this.
  24. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    4,185
    Thanks for the explanations. I forgot to say but all my packages were (and still are) up to date...
     
  25. miniwolf_unity

    miniwolf_unity

    Unity Technologies

    Joined:
    Apr 10, 2018
    Posts:
    104
    @APSchmidt and you are still having the same ArgumentException?
     
    Last edited: May 2, 2019
  26. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    4,185
    • No error message of any kind this time, on trying to open the C# project by right clicking on the script in the editor. in a brand new project,
    • things happen like I have already described in my post #18
     
  27. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    4,185
    Same problem exactly with VS 2019.
     
    tiagoperes likes this.
  28. miniwolf_unity

    miniwolf_unity

    Unity Technologies

    Joined:
    Apr 10, 2018
    Posts:
    104
    Yeah should be no difference between 2019 or 2017.

    @APSchmidt I tried following your repro steps.
    When I right-click and click "Open C# Project" it opens Visual Studio.
    Could you tell me which version of the visual studio package you are using? You can see this under the Package Manager UI. The menu: Window/Package Manager
     
  29. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    4,185
    Does VS also opens when you double-click on the script in the editor like it should?

    I've already said that the packages are up to date. I'm using W7 SP1 up to date.

    Capture.JPG
     
  30. miniwolf_unity

    miniwolf_unity

    Unity Technologies

    Joined:
    Apr 10, 2018
    Posts:
    104
    Yes that works as well.
    I will keep trying to reproduce and post back here if I find anything.
     
  31. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    4,185
    And if you don't?
     
  32. miniwolf_unity

    miniwolf_unity

    Unity Technologies

    Joined:
    Apr 10, 2018
    Posts:
    104
    Then I will post back here, when I release the new version of the package, for you to try. If I cannot reproduce the problem locally, I will need to have you test it out, to know if it resolved the problem.
     
  33. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    428
    miniwolf_unity but what I should do with this?
    Code (JavaScript):
    1. Unable to find bridge dll in registry for Microsoft Visual Studio Tools for Unity for C:/Program Files/Unity2017/MonoDevelop/bin/MonoDevelop.exe
    I don't have and don't want visual studio or something else. I work fine before this stupid upgrade. Now the scripts not opened from unity (I still can open project from folder though)
     
  34. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    4,185
    Does intellisense or whatever it's called in Monodevelop work when you do that? It doesn't for me in VS.
     
  35. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    428
    No, but I don't really care. I need other functions that have worked before, for example, opening the desired line by click and so on. Now I see only this error by click and nothing more. Plus if I open script in folder, it's open just a script but not a project, I need close script and open project in mono, then find script... well it's sucks.
     
  36. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    4,185
    Ah. :) I guess the next version will be released with 2019.2.0a15 or later?
     
  37. miniwolf_unity

    miniwolf_unity

    Unity Technologies

    Joined:
    Apr 10, 2018
    Posts:
    104
    @id0 I have a fix for MonoDevelop, that I can hopefully get published first thing this coming week, I will keep you posted about it.
    @APSchmidt, I do not know when the next alpha is coming out, maybe it will go to beta soon, I do not know. But the new version should come out regardless.
     
    id0 likes this.
  38. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    27,843
    Tried it out today, and ensured visual studio package was installed / up to latest but no joy at all, Double clicking on C# files does absolutely nothing at all, sadly I have no time left and have rolled back to 2019.1 - just leaving message in case.

    Alpha 14 / latest (show preview) package as of today for VS support...
     
  39. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    4,185
    I'm glad we're not alone and a moderator has this problem too.
     
  40. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    27,843
    It's alpha, I expect there to be many problems. I would be worried if it was a late beta though.
     
  41. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    4,185
    @miniwolf_unity already said that he wasn't able to reproduce the problem. It might make it up to final.
     
  42. GilCat

    GilCat

    Joined:
    Sep 21, 2013
    Posts:
    655
    I can't attach Visual Studio anymore. When I try to do it I get a bunch of weird errors.
    I'm on Mac with Unity 2019.2.0a14 and Visual Studio Code Editor 1.0.3 and Visual Studio Editor 1.0.9 packages.
    Do we really need these two packages? Why not just making one?

    Thanks
     
  43. miniwolf_unity

    miniwolf_unity

    Unity Technologies

    Joined:
    Apr 10, 2018
    Posts:
    104
    @GilCat com.unity.ide.vscode (Visual Studio Code Editor) is for Visual Studio Code (VSCode). com.unity.ide.visualstudio (Visual Studio Editor) is for Visual Studio (VS)
    I know that 1.0.9 is broken, I have a fix for that coming out, I am only waiting for RM to promote it, then you should be able to upgrade to the new version.
     
  44. miniwolf_unity

    miniwolf_unity

    Unity Technologies

    Joined:
    Apr 10, 2018
    Posts:
    104
    @GilCat just to make sure that this is not something new, could you paste the errors, or a screenshot of those?
     
  45. GilCat

    GilCat

    Joined:
    Sep 21, 2013
    Posts:
    655
    I've updated to Visual Studio Editor 1.0.10 and it now builds fine but I still can't attach it to Unity.
    I've deleted all .csproj and .sln fine and selected Open C# Project but still no luck on Mac.
    Screenshot 2019-05-07 at 21.57.21.png
    I was also having problems in Windows but that is now fixed on the latest update.
     
  46. miniwolf_unity

    miniwolf_unity

    Unity Technologies

    Joined:
    Apr 10, 2018
    Posts:
    104
    @APSchmidt could you try upgrading to the com.unity.ide.visualstudio@1.0.10? I have fixed a few problems with where Unity didn't open Visual Studio, and I am curious if I have managed to catch the problem you are having.
     
  47. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    4,185
    I reinstall a14 and I tell you. :)
     
    miniwolf_unity likes this.
  48. miniwolf_unity

    miniwolf_unity

    Unity Technologies

    Joined:
    Apr 10, 2018
    Posts:
    104
    @GilCat I have heard people complain that the VsfM is having issues on the new release.
    Can you make sure that in the preferences and look under the Unity options, you have the option to switch between VSTU and Mono Debugger?
     
  49. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    4,185
    Ha ha! You did it! Almost...

    I created a new empty project, updated the package and created a script:
    1. double-clicking on the script does create and open the solution in VS 2019 but doesn't open the script itself,
    2. the script is in the Solution explorer,
    3. once open intellisense doesn't entirely work, there are problems with autocompletion...
    Example: in recent versions of VS, writing:
    Code (CSharp):
    1.     void start
    and punching enter or tab would make the line to autocomplete into:
    Code (CSharp):
    1. private void Start ()
    2.     {
    3.  
    4.     }
    This part doesn't work, intellisense seems to work for other usual lines. Also, the script works but, for some reason Start() is written in gray, not in blue at it should...

    In 2019.1.1f1:

    Capture1.JPG

    In a14:

    Capture2.JPG

    But, you're almost there! ;)
     
    Last edited: May 10, 2019
    wagnerps and Eyon_game like this.
  50. GilCat

    GilCat

    Joined:
    Sep 21, 2013
    Posts:
    655
    Screenshot 2019-05-08 at 19.20.51.png

    I think I have it all set. It seems like the generated solution has no configuration for running the project, just a build configuration.
     
unityunity