コード例 #1
0
 public virtual string GetToolPath(string toolName)
 {
     foreach (string path in runtime.GetToolsPaths(framework))
     {
         string toolPath = Path.Combine(path, toolName);
         if (PropertyService.IsWindows)
         {
             if (File.Exists(toolPath + ".bat"))
             {
                 return(toolPath + ".bat");
             }
         }
         if (File.Exists(toolPath))
         {
             return(toolPath);
         }
         if (File.Exists(toolPath + ".exe"))
         {
             return(toolPath + ".exe");
         }
     }
     return(null);
 }