Example #1
0
        private static List <KeyValuePair <string, string> > FindAviableMsBuildsInProgramFiles()
        {
            var programFiles = Helper.ProgramFiles();

            if (programFiles == null)
            {
                return(new List <KeyValuePair <string, string> >());
            }

            var folders = new List <string> {
                programFiles
            };

            var variables = VsDevHelper.GetCurrentSetVariables();

            if (variables.ContainsKey("VSINSTALLDIR"))
            {
                folders.Add(variables["VSINSTALLDIR"]);
            }

            folders.AddRange(Helper.VisualStudioVersions().Select(
                                 version => Path.Combine(programFiles, "Microsoft Visual Studio", "2017", version)));

            return(folders.SelectMany(FindAviableMsBuildsIn).Distinct().OrderByDescending(k => k.Key).ToList());
        }
Example #2
0
 public void Init()
 {
     if (!Platform.IsUnix())
     {
         VsDevHelper.ReplaceVariablesToVs();
         ModuleBuilderHelper.FindMsBuildsWindows();
         ModuleBuilderHelper.KillMsBuild(log);
     }
 }
Example #3
0
 public ModuleBuilder(ILog log, BuildSettings buildSettings)
 {
     this.log           = log;
     this.buildSettings = buildSettings;
     VsDevHelper.ReplaceVariablesToVs();
 }
Example #4
0
 public void Init()
 {
     VsDevHelper.ReplaceVariablesToVs();
 }