- Home /
Visual Studio 2019 won't open when double clicking on a script
Hello there, I am currently doing the official Unity Tutorials, however, in the 3D Shooter tutorial, I have to open some scripts. I tried to double click on the script icon of the needed script, click on "Open..." at the Script in the Inspector, but nothing happens. I have "Visual Studio 2019" selected for External Script Editor in the Preferences.
Any ideas what I can do or what's the problem?
same problem, updating package for visual studio code didn't help
Check to see if it is your Preferences as DevEnv. Change it to VisualStudio2019
Same problem here. I am trying Unity 2019.2.19 and VS v8.4.2 (the latest as of now). Unity will not open VS.
Answer by Im-ToXeRs · May 20, 2019 at 06:30 AM
Got the same problem, found out why it didn't work. You have to go into Window -> Package Manager, and in there you'll have to update "Visual Studio Code Editor" and "Visual Studio Editor" to the newest version, and that my friend did the trick!
//Toxers
I only see a package called "Visual Studio Code Editor"? I built a fresh, empty URP Unity 2019.3.13 project. Visual Studio 2019 won't open
I'm also seeing this - as of 2019.3, this doesn't appear to be a package anymore.
I have the same problem. I tried your solution by downloading the two packages. But i already had them installed and then i reinstalled them - still didnt work. I updated everything on my computer including windows, Unity and Visual studio. I also made sure to download the Unity game dev in Visual studio. I cant seem to find the problem online
I have the same problem, but Visual Studio doesn't show app anymore in Package $$anonymous$$anager under Unity Repository.. HELP?
Answer by Benjus · May 19, 2019 at 04:35 PM
Go to Window\Package Manager and update both Visual Studio Editors. This solved the issue for me.
Legend. It was getting on my nerves, thinking i had installed it on the wrong folder or something. This solution worked immediately, $$anonymous$$any thanks
Updating did not work for me, so I tried to remove both "Visual Studio Code Editor" and "Visual Studio Editor". It saved the issue for me...
Answer by Julien-Lynge · May 18, 2020 at 04:36 AM
I was able to fiddle with things until it started working.
In my particular case, clicking on a log message that was generated at runtime after I stopped play mode would open visual studio, but wouldn't open the file. However, clicking on a warning message that was generated during compilation would open the file.
Here's what I did:
Went to Preferences > External Tools
External Script Editor was set to Visual Studio 2019 (Community)
Opened the browse window for the external script editor. Navigated to the Visual Studio install directory and found devenv.exe (the VS IDE). When I selected this, it changed my external script editor from "Visual Studio 2019 (Community)" to "Visual Studio 2019" I now had two options in the dropdown: Visual Studio 2019 (Community), and Visual Studio 2019.
I then restarted unity, played and paused, and at first it didn't seem to do anything. So I changed it back to the original value, restarted again, and magically it started working for me.
Unfortunately I can't tell you what exactly I did fixed it, but hopefully this helps someone else!
Thanks for this. I had my external script editor set as devenv.exe, so I changed it to Visual Studio 2019 (Community). Just putting this out there in case anyone has the same problem!
Answer by KrlinM · Nov 06, 2020 at 06:27 PM
I had same problem with Unity 2020.2.0b10, after doubleclick on script Visual Studio wont open. After hours of trying multiple things I updated "Visual Studio Code Editor" and "Visual Studio Editor" from "Window/Package Manager". It DID NOT save the issue, so I deleted both. It saved the issue. However I'm not sure if it was the right solution of the problem.
Answer by Aligdev · Jun 01, 2021 at 10:43 PM
If you use SQL Server read this:
I had this problem, removed and installed multiple versions of Unity as well as packages and Visual studio tools for Unity, updated VS to latest version, nothing changed. Finally, I found that if Sql Server Management Studio (SSMS) is open, then Unity will send "request to open file" to SSMS, just close it and you're fine.
Hope it helps
Holy cow this was exactly my problem, I had it open for a totally unrelated project.
Are you f*** kidding me? I've been trying to get this to work for an hour! I can't believe that fixed it. Thanks!!!!!