14 public static class DotnetHelper
21 public static IEnumerable<string> GetPotentialDotnetPaths(
bool isWindows)
23 var enviromentPath = Environment.GetEnvironmentVariable(
"PATH");
24 if (enviromentPath ==
null)
25 return Enumerable.Empty<
string>();
27 var paths = enviromentPath.Split(
';');
29 var exeName =
"dotnet";
30 IEnumerable<string> enumerator;
34 enumerator =
new List<string>(paths)
36 "C:/Program Files/dotnet",
37 "C:/Program Files (x86)/dotnet",
42 .Select(x => x.Split(
':'))
44 .Concat(
new List<string>(2)
48 "/usr/local/share/dotnet",
51 enumerator = enumerator.Select(x => Path.Combine(x, exeName));