Recently updated to 2020 (happens on both b4 and b5) and I’m getting an issue where scripts randomly open in random versions of visual studio which I have a few versions of because I’m a goober.
I can’t really see a pattern and it’s not too bad but just thought I’d post it and see if anyone had a fix.
Same problem for me. Installed versions are Visual Studio 2019 Community and Visual Studio 2015 Community.
The External Script Editor setting is set to Visual Studio Community 2019 but Unity opens 2015 most of the time. I tried selecting the 2019 Executable directly but that didn’t make a difference.
so far the new beta hasnt done it… but it was definitely random as you’d double click get vs and double click same file expecting it to bring vs to the front and it would load rider…
We saw that with an initial version of the package (1.x). The package was not properly recognizing the extension as handled by VS, and instructed Unity to fall back to the default system Editor for this extension.
OK it just happened again but when i closed rider which i hadnt even actually had open the file I wanted, i noticed vs had a dialogbox with reload file… im wondering if its picking another editor because vs has a dialogbox up and isnt responding
mine seems to have stopped now i changed windows to default to having cs files opened by the same version of vs. It seems then randomly it skips the one you select and tries the windows default
Indeed, when a modal Window is opened in VS, Unity is unable to communicate anymore and will fallback to the default system handler for the file extension used.
Ok so I think we fixed the issue. Until we release a new package, a possible workaround is to use “Asset/Open C# project” once, everytime Unity is launched, to properly initialize the state and open Visual Studio. Then you should be able to open scripts properly from Unity.