Search Unity

  1. We would like to hear your feedback about Unity and our products. Click here for more information.
    Dismiss Notice

Visual studio 2017 no longer opens in a13

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

  1. miniwolf_unity

    miniwolf_unity

    Unity Technologies

    Joined:
    Apr 10, 2018
    Posts:
    66
    Oh sorry, I should have been more specific. I was referring to the preference menu in Visual Studio for Mac.
     
    GilCat likes this.
  2. GilCat

    GilCat

    Joined:
    Sep 21, 2013
    Posts:
    357
    Oh ok.
    What is the correct one? VSTU or Mono. I've tried both and no success. Still can only build, well actually now I can't event build on VS.
    I get a bunch of Error CS1666: You cannot use fixed size buffers contained in unfixed expressions. Try using the fixed statement. (CS1666) (Assembly-CSharp)
     

    Attached Files:

  3. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    1,994
    Out of curiosity, I started the test project with 2019.2.0b1: the problem described here is there too; specifically what I describe in my post #49. :)
     
    Last edited: May 9, 2019
    Ziplock9000 likes this.
  4. Protagonist

    Protagonist

    Joined:
    Dec 22, 2010
    Posts:
    7
    Having similar problems...

    On:
    • Unity 2019.2.0b1
    • macOS 10.14.4
    • VS Code
    • Visual Studio Code Editor 1.0.4 package
    When I click on a .cs file:
    • It doesn't create the .csproj or .sln files
    • It doesn't open VS Code with the proper file/folder showing (it just opens VS Code with no current file/folder)
     
  5. FarNose

    FarNose

    Joined:
    Mar 29, 2019
    Posts:
    4
    Thank you for solving the issue and keep us informed (which avoid us a lot of pain as we know this is not on our side).
    Now, just to tell, I have a problem with this though.
    My bad, didn't see there was already a discussion about this bug, and created my own ticket as I faced it:
    1151157

    So, as you can read the answer was:
    1) VS 2019 was still in "preview state" ... => No, it is not since 09th of april 2019 if i remember correctly
    2) Then suggest to contact VS team to solve this...

    As VS 2019 was perfectly working with Unity version 2019.2.0a11, I just switched back, hoping one day or another someone would admit there is a problem and try to solve it.

    So, please, I know this is alpha (or beta now), and I expect to confront some issues. I'm really happy to have a preview of new stuffs, hence, will do my best to report bugs the best I can. I will most certainly be mistaken some times, or may not expose the problem correctly. But please, have a little consideration on your side and try to consider our reports and ask for more details before closing. The worst is being left with a "there's no problem you're just dreaming" answer. Nobody can rely on this.

    However, I'm happy this is now solved with 2019.2.0b1 and yes, VS 2019 xD

    Thanks for all the good work, and Entities and new Physics which are really great :)
     
  6. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    1,994
    The problem is not solved at all in 2019.2.0b1, at least for VS 2019. I don't know about VS 2017.
     
  7. FarNose

    FarNose

    Joined:
    Mar 29, 2019
    Posts:
    4
    Sorry to hear that :/
    I may have spoke to quickly, though, at least, it works for me and all my projects with the following: Unity 2019.2.0b1, VS 2019 and package "Visual Studio Editor" Version 1.0.10
     
    Ziplock9000 likes this.
  8. Ziplock9000

    Ziplock9000

    Joined:
    Jan 26, 2016
    Posts:
    159
    I have this issue with 2019.2.0b1 + VS2017 and have no option to downgrade as it's ghosted out!

    UPDATE Upgrading the Visual Studio Editor package fixed the issue.
     
    naviln and miniwolf_unity like this.
  9. miniwolf_unity

    miniwolf_unity

    Unity Technologies

    Joined:
    Apr 10, 2018
    Posts:
    66
    @FarNose
    1. Yes that is not true what is being stated. It is out of preview you are absolutely correct.
    2. I have notified the guys at Microsoft about this bug. I would still recommend that you make a ticket through their channels so they can keep track of it. If you have done so already, just link it here and I will pass it along, so we can get this sorted out. Unfortunately, Unity can do very little in order to prevent external processes crash, even if we are tightly coupled.
    But I am happy that you are still in good spirits, and I really appreciate that you took the time to write the bug report. Because other users might encounter the same problem.
     
  10. miniwolf_unity

    miniwolf_unity

    Unity Technologies

    Joined:
    Apr 10, 2018
    Posts:
    66
    Yes, I have not been able to narrow the problem down yet. Intellisense problems are usually an issue with how the csproj and sln files are generated. If you delete those and regenerate them, does that change anything?
     
  11. FarNose

    FarNose

    Joined:
    Mar 29, 2019
    Posts:
    4
    @miniwolf_unity, @apschmidt
    Hi,
    First, I was wrong in post #55 and #57 when I pretend the problem was solved. As I'm using it, still have problem with the Unity Solution not showing any files and some crashes.

    That leads to my second point: as there was no problem with 2019.2.0a11, I just went to the code and check for what I've changed.
    Result:
    Previous code from 2019.2.0a11 was inside the editor code, and contained code relative to VS 2019, and was working.

    Code from the last versions has been moved into a package, and guess what, the parts concerning VS 2019 has benn lost during the tranfer. I don't know how to say this, but I suspect it might actually be worth giving a try to understand why it was and why it is not working. And probably setting back the code that was handling with VS 2019 before I contact VS 2019 team (and I wont do it, because I know they can't do anything about that).

    So, yesterday I've been trying porting back the handling of VS 2019. This is not too hard. Unfortunatly, it doesn't solve the problems. At least, I ll wait to have the handling of VS 2019 be re-integrated before asking anything to VS 2019 team.
    But some other changes has been made to the code during the transfer to the package version, and I suspect those changes are the problem. You should definitly giving it a look according to me.

    UnityVSSupport.cs
    Code (CSharp):
    1.         private static bool TryGetVisualStudioVersion(string externalEditor, out VisualStudioVersion vsVersion)
    2.         {
    3.             switch (ProductVersion(externalEditor).Major)
    4.             {
    5.  
    6. ...
    7.  
    8.                 case 16:
    9.                     vsVersion = VisualStudioVersion.VisualStudio2019;
    10.                     return true;
    11.             }
    12.  
    13.             vsVersion = VisualStudioVersion.Invalid;
    14.             return false;
    15.         }
    16.  
    Code (CSharp):
    1.         private static string GetVstuBridgeAssembly(VisualStudioVersion version)
    2.         {
    3.             try
    4.             {
    5.                 var vsVersion = string.Empty;
    6.  
    7.                 switch (version)
    8.                 {
    9.                     // Starting with VS 15, the registry key is using the VS version
    10.                     // to avoid taking a dependency on the product name
    11.                     case VisualStudioVersion.VisualStudio2017:
    12.                         vsVersion = "15.0";
    13.                         break;
    14.                     case VisualStudioVersion.VisualStudio2019:
    15.                         vsVersion = "16.0";
    16.                         break;
    17.                     // VS 2015 and under are still installed in the registry
    18.                     // using their project names
    19.                     case VisualStudioVersion.VisualStudio2015:
    20.                         vsVersion = "2015";
    21.                         break;
    22.  
    23. ...
    24.                 }
    25.  
    26.                 // search first for the current user with a fallback to machine wide setting
    27.                 return GetVstuBridgePathFromRegistry(vsVersion, true)
    28.                     ?? GetVstuBridgePathFromRegistry(vsVersion, false);
    29.             }
    30.             catch (Exception)
    31.             {
    32.                 return null;
    33.             }
    34. }
    You can find the equivalent methods in the new Visual package, but the cases for VS 2019 have just vanished.

    Anyway, as I mentioned earlier,some other changes have been made (as some of the unity editor API are no more accessible from package), and I suspect some problems may come from it, though, I do not understand anything at all in the modified code (sync with VS) xD

    I can't help anymore, but hope this will give a start​
     
  12. miniwolf_unity

    miniwolf_unity

    Unity Technologies

    Joined:
    Apr 10, 2018
    Posts:
    66
    @FarNose that is a great catch. Yes that is definitely a regression. I will dig into this.
     
    FROS7 likes this.
  13. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    1,994
    Hi,
    I tried again. This time, before starting the project, I deleted the csproj, sln files and the hidden .vs folder. I also deleted other folders in the project and kept only the Assets, packages and ProjSettings . After Unity rebuilt the library and started the project:
    1. I went to the Package Manager and made sure everything was up to date,
    2. I double-clicked on the script; Visual Studio 2019 started and created the csproj and sln files but the script did not load, I had to double-click on it in the Solution Manager to open it.
    3. Visual Studio still considers that Start () is "unused".
    4. Out of curiosity, I took a look at the "Project/Assembly-CSharp properties..." and they display an error (see image below).
    Images:
    • the packages that are installed in the project:
    Sans-titre-6.jpg
    • Visual Studio 2019 comment on Start () (no changes after I installed the update, by the way):
    Sans-titre-7.jpg
    • the error message that displays in the Assembly CSharp properties:
    Sans-titre-8.jpg
     
  14. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    1,994
    @miniwolf_unity Hi, I just installed 2019.3.0a2; the Visual Studio package that comes with it is still 1.0.5. I created a script and updated the package: the problem is exactly the same as described in my latest post above. The error message in Properties is the same. :(
     
  15. Protagonist

    Protagonist

    Joined:
    Dec 22, 2010
    Posts:
    7
    @miniwolf_unity An update using the latest VS Code Editor (1.0.7)...

    It now generates the .csproj and .sln files, and it opens VS Code, but not to the file when clicking on a .cs file within the editor. I'm on MacOS 10.14.5 and VS Code April release.
     
  16. naviln

    naviln

    Joined:
    Oct 18, 2016
    Posts:
    17
    Thanks, installing the Visual Studio editor package in Unity fixed it for me
     
  17. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    1,994
    Are you sure? When you double click on a script in the editor, does it open in VS or must you open it manually after the solution starts?
     
  18. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    1,994
  19. devonzhang11

    devonzhang11

    Joined:
    Dec 11, 2015
    Posts:
    8
    Same problem here with 2019.2.0b1 + vs code 1.34.0 (2019-05-15T21:49:51.528Z), macOS Mojave 10.14.5
    This is very frustrating...
    Hopefully, we can get a fix soon.

    FYI, my friend said it worked for him with Rider.
     
  20. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    1,994
    @miniwolf_unity I just installed 2019.2.0b3, upgraded the Visual Studio Editor package to 1.0.11 and the Rider package (not using Rider, whatever that is) and tested the script again.

    The problem is still there, no changes at all. Start() and Update() are not recognised ("unused").

    Capture.JPG
     
  21. devonzhang11

    devonzhang11

    Joined:
    Dec 11, 2015
    Posts:
    8
    Hi @APSchmidt , Rider is an IDE from JetBrain
    https://www.jetbrains.com/rider/

    Its commercial version costs US $13.90/per month.

     
  22. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    1,994
    Yeah, I took a look at it. I hope we won't have to use a commercial solution when Visual Studio is free and works very well. I don't even see why people buy commercial ide when they can use free ones...
     
  23. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    1,994
    So, I installed the trial version of Rider. It works as is; Start() and Update() are recognised.

    This is it then? We must now use a commercial IDE with Unity? Without me.

    Capture.JPG
     
  24. miniwolf_unity

    miniwolf_unity

    Unity Technologies

    Joined:
    Apr 10, 2018
    Posts:
    66
    Sorry for keeping a lot of you waiting for a new reply. But I guess that you would rather see me working on fixing the remaining issues, that other wonderful users just as yourself report to me. Than seeing me writing long messages here on the forum assuring you that at some point these issues will be resolved, which they of course will be ;). Keep up writing your concerns and your problems here on the forum, or reporting bugs, I really appreciate it. It really is the only way for me to know that they exist.

    @FarNose I have updated the newest version of the visual studio package (v1.0.11) with the regressions that you found. Can you verify if the problems you experienced has been solved now?

    @Protagonist and @devonzhang11 I believe I have a repro case on mac as it does not seem to be reproducible on Linux or Windows. If you have any additional information please share it, or other problems with the latest versions.

    @APSchmidt I am sorry to hear that you are still having problems with the Visual Studio package integration. I am having a lot of difficulties together with my QAs figuring out how to reproduce the problems that you are having with VS2019 and the latest packages. It seems to be something to do with how the csproj and sln are generated. If you compare what Rider and Visual Studio generates, or how Unity 2019.1 and 2019.2 generates the project files. Can you spot anything noteworthy?

    If you feel that your questions has been overlooked or if you are still having issues, the best way for you (and for me) to keep track of what has been fixed, is for you to create a bug ticket with your info on the problem. But of course you can also ask questions on this forum post or another one. We will try to get an answer to you.

    Just clarifying some things here>
    Visual Studio is a commercial IDE as well, if you use this in an organisation over 5 people, they require that you purchase a license. The only actual free editor supported by Unity is Visual Studio Code, also known as VSCode.
    Rider and Visual Studio is supported just as much. So there is no-one forcing you to choose either IDE. You can even write your own package integration using the new APIs, if you want to add support for a new editor, or you want to configure your own setup for the editor that you use. Unity currently only supports these three specific code editors.
     
    LeonhardP and APSchmidt like this.
  25. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    1,994
    Thank you for taking the time to give us some news. :)

    I have no idea how I could compare how 2019.1 generates the project files with how 2019.3 does; could you tell me where I should look about that? Thank you.

    I switched to 2019.3 alpha but the problem is the same; I also deinstalled Rider.

    Edit: I took a closer look at what happened in the projects directories after I tried opening a script in 2019.3 alpha and in 2019.1. The only obvious thing I notice is that:
    • "slnx.sqlite" is missing in "~\Test Project (2019.3.0a3)\.vs",
    • "storage.ide-shm" and "storage.ide-wal" are missing from "~\Test Project (2019.3.0a3)\.vs\Test Project (2019.3.0a3)\v16\Server\sqlite3",
    • there is a ".suo" file in "~Test Project (2019.3.0a3)\.vs\Test Project (2019.3.0a3)\v16" that is not present in "~\Test Project (2019.1.4f1)\.vs\Test Project (2019.1.4f1)\v16".
    I hope this can be of help...
     
  26. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    1,994
    Okay, I give up. I just installed 2019.1.4f1 and upgraded one of my projects in it. It appears that the description above also applies to that upgraded project and VS 2019 is working properly...
     
  27. Protagonist

    Protagonist

    Joined:
    Dec 22, 2010
    Posts:
    7
    @miniwolf_unity I have found some interesting stuff...

    If I completely close VS Code (meaning quit VS Code so it isn't running in the background), and then click on a .cs file in the Unity editor, it opens VS Code correctly with that file showing. If I have only closed the VS Code window (so it's still running in the background, without any open windows), when I click on a .cs file, it opens a new window of VS Code at the start screen (in my case, the VS Code welcome screen).

    Of note, this also works when I click on an error message from the console. If VS Code has been completely quit, it will open everything up right to the correct line and column, and it doesn't work if there is an instance of VS Code already running.

    I wondered if this is a VS Code problem or there is some setting in VS Code that tells it how to react to invoking it with arguments while already running. I searched through many VS Code settings and tried several, and the problem remains. So I did a test using the terminal window. If I 'cd <Assets folder>' and manually invoke 'code <some script>.cs', it opens correctly, even if I already have an instance of VS Code running. I also tried disabling all my VS Code extensions to rule them out as causing a problem and the problem remains.This seems to indicate it's not a problem with VS Code.

    Hope this latest update helps...
     
  28. devonzhang11

    devonzhang11

    Joined:
    Dec 11, 2015
    Posts:
    8
    @miniwolf_unity , Thanks for updating. I recently are working on Mac. I've tried on Windows earlier, I remember it was not working perfectly either. And my friend is working on Windows with Unity 2019.2b2, and had similar issue. (By similar, I mean there might be some difference in behavior, but general it doesn't work as expected. )

    I just updated the VS Code Editor Package to 1.0.7, and did a quick test. Not working.

    However, I did saw some improvement:
    If I quit VS Code completely, and double click a .cs file in Unity, VS Code will try to open the project and the file, but the content of the file didn't showed up.

    I noticed the .cs file the VS Code tried to open had an extra ' in the file path. See below screenshots for reference.




    This happened before I reset the arguments in External Tools settings. More was updated in next post.

    Thanks,
    Devon
     
    Last edited: May 27, 2019
  29. devonzhang11

    devonzhang11

    Joined:
    Dec 11, 2015
    Posts:
    8
    @miniwolf_unity,
    I did some more test, reseting the arguments in External Tools setting, as in below screenshot.
    Snip20190527_35.png
    And then, I got exactly same issue as @Protagonist :

    * if the VS Code was quit completely, Unity was able to open the correct .cs file.
    * once the VS Code was opened and running in background, Unity will not be able to open the double clicked .cs file. It just brought the VS Code to front and did nothing else.
    Snip20190527_37.png

    Hope this helps.

    Thanks,
    Devon
     
  30. devonzhang11

    devonzhang11

    Joined:
    Dec 11, 2015
    Posts:
    8
    Hi @miniwolf_unity, and @Protagonist ,
    I found an alternative, using the option: Open by file extension.

    With this option, you will be able to
    1. open the file by double click on the cs.file
    2. locate your the error position when click any error in Unity Console

    You will need to
    1. open the project folder the first time a file is opened
    2. ignore some annoying error message in Unity saying bala bala exception

    Exception thrown while invoking [OnOpenAssetAttribute] method 'Unity.CodeEditor.CodeEditor:OnOpenAsset (int,int,int)' : Win32Exception: Cannot find the specified file


    @APSchmidt , you may want to have a try with VS Studio as I only tested this workaround with VS Code.
    Snip20190527_38.png
    Snip20190527_39.png

    Hope this helps,
    Devon
     
  31. miniwolf_unity

    miniwolf_unity

    Unity Technologies

    Joined:
    Apr 10, 2018
    Posts:
    66
    The way to do this is to create a project in 2019.1 then save the csproj and sln files that gets generated when you open Visual Studio 2019.
    Now create the same project in 2019.2 or 2019.3, with the newest version of Visual Studio Editor package, and compare the files that gets generated when you open Visual Studio here, with the ones that you generated with 2019.1.
     
  32. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    1,994
    Thank you.

    Sorry if I am stupid but how do I compare two .csproj files or two .sln files between each other?

    Not waiting for your answer; I'm sending you a pm with a link to the transferred projects. :)
     
    Last edited: May 27, 2019
  33. Xarnowit

    Xarnowit

    Joined:
    Apr 8, 2014
    Posts:
    2
    I'm having same issue as @APSchmidt - with Unity 2019.2.b3 and VS 2019. VSTU seems broken / partially working:
    In VS Unity MonoBehaviour magic methods show as unused, no documentation, and there is no intellisense for them. I'm also missing option to show Unity Project View (but that may have been removed from tools, not sure) and also when looking at Project/Assembly-CSharp properties I get same error.

    My Visual studio Code Editor Package version is 1.0.11. I did some basic troubleshooting steps reinstalled VS (few times), created new project, tried VS2017 etc. Nothing seems to be working.

    @APSchmidt You can compare both files using visual studio code (open both, right clicking should give you options for comparison). VS also has that function but cant remember how to use it right now.
     
    Last edited: May 27, 2019
  34. Xarnowit

    Xarnowit

    Joined:
    Apr 8, 2014
    Posts:
    2
    Can confirm that going back to latest 2019.1 fixes the issue, but maybe that is because I forgot to update Visual studio Code Editor Package before conducting my test. Anyways currently going through *csproj files diff, seeing if I can make it work, but there is a lot of changes

    Edit: Ok after some time I managed to find responsible part @miniwolf_unity:
    Code (CSharp):
    1. <PropertyGroup>
    2.     <ProjectTypeGuids>{E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    3.     <UnityProjectGenerator>Unity/VSTU</UnityProjectGenerator>
    4.     <UnityProjectType>Game:1</UnityProjectType>
    5.     <UnityBuildTarget>StandaloneWindows64:19</UnityBuildTarget>
    6.     <UnityVersion>2019.1.4f1</UnityVersion>
    7. </PropertyGroup>
    After adding this (and only this) fragment to 2019.2.b3 csproj under other PropertyGroups I get back intellisense for magic methods, and unity project window view.

    Edit2: Doesn't seem to fix documentation for magic methods when hovering over them, but it shows when autocomplete kicks in. Bizzare.
     
    Last edited: May 27, 2019
  35. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    1,994
    I didn't go far enough when I posted this. I loaded the test project I had made with 2019.3.0a3 and went back to the Assembly-CSharp properties in Visual Studio just now; when I select the "Code Analisys" tab on the left, I get this:

    Capture.JPG

    I do not get any error when I open the test project I made with 2019.1.4f1.
     
  36. cecarlsen

    cecarlsen

    Joined:
    Jun 30, 2006
    Posts:
    494
    So I just installed 2019.2.0b4 on Windows, experienced that my scripts no longer open in Visual Studio 2017 when I double click them, and then I found this thread.

    Is there any official advice on how to make VS happy again?
     
  37. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    1,994
    The official advice is wait until the Visual Studio package is fixed; fortunately the beta and alpha versions of Unity are not to be used for production and Visual Studio works fine in 2019.1.

    Did you make sure the packages are up to date in the Package Manager?
     
  38. cecarlsen

    cecarlsen

    Joined:
    Jun 30, 2006
    Posts:
    494
    Thanks @APSchmidt I just updated the Visual Studio package and VS seems to be happy now. VS opens up when I double click files in the Unity Editor. I'm using Visual Studio Community 2017 4.7.03056.
     
  39. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    1,994
    Do the scripts open too? Does intellisense work properly?
     
  40. cecarlsen

    cecarlsen

    Joined:
    Jun 30, 2006
    Posts:
    494
    Yes, it seems so.
     
  41. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    1,994
    Did you try the example in my post #49?

    (Click to expand the quote)
     
  42. cecarlsen

    cecarlsen

    Joined:
    Jun 30, 2006
    Posts:
    494
    Just tried. Also works.
     
  43. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    1,994
    You are lucky then. :)
     
  44. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    1,994
    This has nothing to do with the problem exposed here, which is about Visual Studio working fine for some people and not working properly for others in beta and alpha versions of Unity.

    Post Processing not working in beta or alpha versions is not exactly surprising; you should create your own thread.
     
  45. FarNose

    FarNose

    Joined:
    Mar 29, 2019
    Posts:
    4
    Hi - it gets better, but there are still some problems:
    1) When visual is closed, double clicking a script inside unity editor opens Visual but do not select any file, ie opens with the previous selected file (during a previous session) which can be the one you double click, or any other one, or none if there were none.
    However, it seems to work if visual is already opened now ^^ (selecting the right file), so, it just fail on initial opening apparently.
    And another strange phenomenon, Visual is send in background on initial opening - or unity is send on foreground IDK, anyway, the editor opens but unity stays on top.
    2) The unity explorer inside visual studio (kind of solution explorer but that shows only revelant files for unity) is empty on some projects. I tried with a simple project I created from scratch with a single file, and it worked. Then, I tried with EntityComponentSystemSamples/UnityPhysicsExamples from unity git repository, and no matter what, the unity explorer keeps empty.
    Again, all of this is working like a charm with Visual 2019 and unity 2019.2.0a11 (opening correctly, and correct explorer). That's why I suspect the new package and not visual 2019.

    Thanks for the work, hope this message helps
     
  46. GilCat

    GilCat

    Joined:
    Sep 21, 2013
    Posts:
    357
    At this point Visual Studio 2019 and Unity 2019.2.0b(4) in MacOS seems like a nightmare.
    It's just very hard to debug specially when one is working with DOTS and have to set breakpoint inside jobs among other problems.
    Here is my imminent list:
    • Can't watch reference type variables anywhere but in the "locals" tab. (Hovering in code or watching explicitly doesn't work)(Fixed with Visual Studio 8.0.9 (build 5))
    • Can't start debugging by hitting play button in VS, only "Attach to Process..." seem to work.
    • Can't set breakpoints inside jobs as they are never reached or Unity Editor just freeze.
    Right now I'm using Unity 2019.2.0b4 with Visual Studio 8.0 build 2624 and the following packages:
    • Visual Studio Editor 1.0.11
    • Visual Studio Code Editor 1.0.7
    • Entities 0.0.12 preview 33
    Note that I can't debug just fine in windows environment with this package setup and using Visual Studio 2017.
    At this point I'm considering move to Rider IDE as all these problems seem to be gone in there.

    Thanks for the effort nevertheless.

    EDIT: Updated to Visual Studio 8.0.9 (build 5)
     
    Last edited: Jun 4, 2019
  47. EASYJABBA

    EASYJABBA

    Joined:
    May 29, 2019
    Posts:
    14
    Dosent even work in the alpha versions nevermind the betas.

    Unity devs what is going off here? Don't you think its time to fix this mess? Its a basic bloody function, opening a script.
     
  48. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    1,994
    @miniwolf_unity is working on it.
     
  49. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    1,994
    @miniwolf_unity

    Hello!

    I hope you are well! :)

    I just installed 2019.3.0a5. Just after that:
    • I went to the Package Manager and updated the Visual Studio Editor package to 1.0.11,
    • I took a look at the Preferences/External Tools and there I saw a "Generate All .csProj files" and I ticked it; a bunch of .csProj files were indeed created in the project directory, but no .vs folder,
    • I created a script attached to the camera and immediately got two error messages (see below),
    • I double clicked on the script, Visual Studio 2019 started and was immediately rejected in the background,
    • the script didn't open; I had to open it manually,
    • auto-completion doesn't work.
    Error message 1:
    Code (CSharp):
    1. EndLayoutGroup: BeginLayoutGroup must be called first.
    2. 0x0000000142A3403C (Unity) StackWalker::GetCurrentCallstack
    3. 0x0000000142A37581 (Unity) StackWalker::ShowCallstack
    4. 0x000000014122A335 (Unity) GetStacktrace
    5. 0x0000000143624040 (Unity) DebugStringToFile
    6. 0x0000000142A6A061 (Unity) DebugLogHandler_CUSTOM_Internal_Log
    7. 0x0000000010D44A9B (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
    8. 0x0000000010D4495B (Mono JIT Code) [DebugLogHandler.cs:10] UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    9. 0x0000000010D44025 (Mono JIT Code) [Logger.cs:61] UnityEngine.Logger:Log (UnityEngine.LogType,object)
    10. 0x0000000010D43CB9 (Mono JIT Code) [Debug.bindings.cs:127] UnityEngine.Debug:LogError (object)
    11. 0x00000000154D9F43 (Mono JIT Code) [GUILayoutUtility.cs:334] UnityEngine.GUILayoutUtility:EndLayoutGroup ()
    12. 0x0000000015896A2B (Mono JIT Code) [GUILayout.cs:289] UnityEngine.GUILayout:EndVertical ()
    13. 0x0000000011512023 (Mono JIT Code) [GUILayout.cs:531] UnityEngine.GUILayout/VerticalScope:CloseScope ()
    14. 0x000000001557DFC8 (Mono JIT Code) [GUI.cs:1752] UnityEngine.GUI/Scope:Dispose ()
    15. 0x000000001150391B (Mono JIT Code) [HostView.cs:131] UnityEditor.HostView:OldOnGUI ()
    16. 0x0000000015441421 (Mono JIT Code) [IMGUIContainer.cs:280] UnityEngine.UIElements.IMGUIContainer:DoOnGUI (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,bool,UnityEngine.Rect)
    17. 0x000000001543E3EB (Mono JIT Code) [IMGUIContainer.cs:494] UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect)
    18. 0x00000000166D50AB (Mono JIT Code) [IMGUIContainer.cs:475] UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event)
    19. 0x00000000166FD24B (Mono JIT Code) [IMGUIContainer.cs:465] UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUI (UnityEngine.UIElements.EventBase)
    20. 0x0000000013DEFD2B (Mono JIT Code) [IMGUIContainer.cs:446] UnityEngine.UIElements.IMGUIContainer:HandleEvent (UnityEngine.UIElements.EventBase)
    21. 0x00000000166F4B24 (Mono JIT Code) [MouseCaptureDispatchingStrategy.cs:98] UnityEngine.UIElements.MouseCaptureDispatchingStrategy:DispatchEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
    22. 0x0000000013DDD26E (Mono JIT Code) [EventDispatcher.cs:282] UnityEngine.UIElements.EventDispatcher:ProcessEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
    23. 0x0000000013DD757B (Mono JIT Code) [EventDispatcher.cs:157] UnityEngine.UIElements.EventDispatcher:Dispatch (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel,UnityEngine.UIElements.DispatchMode)
    24. 0x0000000013DD71A3 (Mono JIT Code) [Panel.cs:210] UnityEngine.UIElements.BaseVisualElementPanel:SendEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.DispatchMode)
    25. 0x00000000152A2B83 (Mono JIT Code) [UIElementsUtility.cs:292] UnityEngine.UIElements.UIElementsUtility:DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel)
    26. 0x00000000152A22EB (Mono JIT Code) [UIElementsUtility.cs:107] UnityEngine.UIElements.UIElementsUtility:ProcessEvent (int,intptr)
    27. 0x00000000152A1C54 (Mono JIT Code) [GUIUtility.cs:179] UnityEngine.GUIUtility:ProcessEvent (int,intptr)
    28. 0x00000000152A1E73 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_bool_int_intptr (object,intptr,intptr,intptr)
    29. 0x000007FEBDF1C11B (mono-2.0-bdwgc) [mini-runtime.c:2809] mono_jit_runtime_invoke
    30. 0x000007FEBDEA2282 (mono-2.0-bdwgc) [object.c:2921] do_runtime_invoke
    31. 0x000007FEBDEAB27F (mono-2.0-bdwgc) [object.c:2968] mono_runtime_invoke
    32. 0x00000001429B8262 (Unity) scripting_method_invoke
    33. 0x00000001429B1DB1 (Unity) ScriptingInvocation::Invoke
    34. 0x00000001429ABA8A (Unity) ScriptingInvocation::Invoke<bool>
    35. 0x000000013FD796A9 (Unity) Scripting::UnityEngine::GUIUtilityProxy::ProcessEvent
    36. 0x0000000140808AAC (Unity) GUIView::ProcessRetainedMode
    37. 0x0000000141251006 (Unity) GUIView::OnInputEvent
    38. 0x00000001408089BC (Unity) GUIView::ProcessInputEvent
    39. 0x00000001412528D5 (Unity) GUIView::ProcessEventMessages
    40. 0x000000014124CEE0 (Unity) GUIView::GUIViewWndProc
    41. 0x0000000077159BBD (USER32) TranslateMessageEx
    42. 0x00000000771598C2 (USER32) TranslateMessage
    43. 0x000000014125047B (Unity) MainMessageLoop
    44. 0x000000014125798F (Unity) WinMain
    45. 0x0000000143FD3652 (Unity) __scrt_common_main_seh
    46. 0x000000007703556D (kernel32) BaseThreadInitThunk
    47. 0x000000007729385D (ntdll) RtlUserThreadStart
    Error message 2:
    Code (CSharp):
    1. InvalidOperationException: Stack empty.
    2. System.Collections.Stack.Peek () (at <23c160f925be47d7a4fd083a3a62c920>:0)
    3. UnityEngine.GUI.EndScrollView (System.Boolean handleScrollWheel) (at C:/buildslave/unity/build/Modules/IMGUI/GUI.cs:1518)
    4. UnityEngine.GUILayout.EndScrollView (System.Boolean handleScrollWheel) (at C:/buildslave/unity/build/Modules/IMGUI/GUILayout.cs:389)
    5. UnityEngine.GUILayout.EndScrollView () (at C:/buildslave/unity/build/Modules/IMGUI/GUILayout.cs:383)
    6. UnityEditor.IMGUI.Controls.AdvancedDropdownWindow.DrawList (UnityEditor.IMGUI.Controls.AdvancedDropdownItem item) (at C:/buildslave/unity/build/Editor/Mono/Inspector/AdvancedDropdown/AdvancedDropdownWindow.cs:455)
    7. UnityEditor.IMGUI.Controls.AdvancedDropdownWindow.DrawDropdown (System.Single anim, UnityEditor.IMGUI.Controls.AdvancedDropdownItem group) (at C:/buildslave/unity/build/Editor/Mono/Inspector/AdvancedDropdown/AdvancedDropdownWindow.cs:389)
    8. UnityEditor.IMGUI.Controls.AdvancedDropdownWindow.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/Inspector/AdvancedDropdown/AdvancedDropdownWindow.cs:243)
    9. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <23c160f925be47d7a4fd083a3a62c920>:0)
    10. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    11. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <23c160f925be47d7a4fd083a3a62c920>:0)
    12. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <23c160f925be47d7a4fd083a3a62c920>:0)
    13. UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:355)
    14. UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:349)
    15. UnityEditor.HostView.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:138)
    16. UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:297)
    17. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:492)
    18. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:475)
    19. UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:465)
    20. UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:446)
    21. UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/Events/MouseCaptureDispatchingStrategy.cs:93)
    22. UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:280)
    23. UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:156)
    24. UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:209)
    25. UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:289)
    26. UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:107)
    27. UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

    After that, I deleted all the .csproj files that had been created and the .vs directory that had been created when I double-clicked on the script. Then I:
    • went to the Preferences and unticked "Generate All .csProj files",
    • deleted the script I had created and created a new one (no error messages popped up this time),
    • double-clicked on the script,
    • Visual Studio 2019 started and was rejected in the background,
    • the script didn't open in VS, I had to open it manually,
    • auto-completion doesn't work.
     
  50. EASYJABBA

    EASYJABBA

    Joined:
    May 29, 2019
    Posts:
    14
    Hello.

    May I ask what is Miniwolf Unity? Is that the dev group or are you telling me literally one guy is working on this?