internal virtual bool TryGetVisualStudioInstallationForPath(string editorPath, out IVisualStudioInstallation installation) { // lookup for well known installations foreach (var candidate in _installations) { if (!string.Equals(Path.GetFullPath(editorPath), Path.GetFullPath(candidate.Path), StringComparison.OrdinalIgnoreCase)) { continue; } installation = candidate; return(true); } return(Discovery.TryDiscoverInstallation(editorPath, out installation)); }
private static void CheckCurrentEditorInstallation() { var editorPath = CodeEditor.CurrentEditorInstallation; try { if (Discovery.TryDiscoverInstallation(editorPath, out _)) { return; } } catch (IOException) { } UnityEngine.Debug.LogWarning($"Visual Studio executable {editorPath} is not found. Please change your settings in Edit > Preferences > External Tools."); }