I’m trying to work on a project, but when I attempt to open any scripts in Visual Studio I get an error:
Microsoft Visual Studio
Could not start visual studio due to an error. Microsoft.ServiceHub.Client.ControllerConnectionException: Controller terminated before accepting connections. Exit code: 22 (ErrorStartingServer).
I’ve tried researching the issue but haven’t been able to find anything helpful. Anyone have any idea why this might be happening?
I know this is more of a Visual Studio problem than anything, but I didn’t know where else to ask. Sorry.
Can you open VS all by itself?
You may want to reboot first. And if the issue persists, uninstall VS. Then check that you have virus scanner disabled and reinstall VS (can do via Unity Hub).
@CodeSmile
I opened Visual studio and was able to manually drag the script I wanted to open into the window from the Unity Editor. This properly opened the script so I can edit it. The issue only occurs when I double-click the script in the editor to open it.
Sorry about the late reply, I’ve been busy elsewhere. Thanks.
In that case, verify in Preferences => External Tools that VS is set as your “External Script Editor” (mine is Rider):
1 Like
I selected a different version of Visual Studio and it is working now. Thanks.
I checked this earlier and there was no other options but this time there was. I don’t know why.