private static IEnumerable <VisualStudioInstance> GetInstances(VisualStudioInstanceQueryOptions options) { #if NET46 var devConsole = GetDevConsoleInstance(); if (devConsole != null) { yield return(devConsole); } #if FEATURE_VISUALSTUDIOSETUP foreach (var instance in VisualStudioLocationHelper.GetInstances()) { yield return(instance); } #endif #endif #if NETCOREAPP var dotnetSdk = DotNetSdkLocationHelper.GetInstance(options.WorkingDirectory); if (dotnetSdk != null) { yield return(dotnetSdk); } #endif }
private static IEnumerable <VisualStudioInstance> GetInstances() { var devConsole = GetDevConsoleInstance(); if (devConsole != null) { yield return(devConsole); } foreach (var instance in VisualStudioLocationHelper.GetInstances()) { yield return(instance); } }