public void CheckArgsWhenExecuting() { SetupMsBuildVersions(include40: false, include120: false); SetupRunProgramTask(); Tasks.Setup(x => x.RunProgramTask(It.IsAny <string>())).Returns(_runProgramTask.Object); _task = new CompileSolutionTask("x.sln", "Release", _flubuEnviroment.Object); _task.WithArguments("aaa"); _task.Execute(Context.Object); Assert.Equal(4, _task.GetArguments().Count); }
private static void TargetCompile40(ITaskContext context) { CompileSolutionTask task = new CompileSolutionTask( context.Properties.Get <VSSolution>(BuildProps.Solution).SolutionFileName.ToString(), "Release-4.0"); task.MaxCpuCount = context.Properties.Get("CompileMaxCpuCount", 3); task.Target = "Rebuild"; task.Execute(context); }
public static void TargetCompile(ITaskContext context) { VSSolution solution = context.Properties.Get <VSSolution>(BuildProps.Solution); string buildConfiguration = context.Properties.Get <string>(BuildProps.BuildConfiguration); bool useSolutionDirAsMsBuildWorkingDir = context.Properties.Get( BuildProps.UseSolutionDirAsMSBuildWorkingDir, false); CompileSolutionTask task = new CompileSolutionTask( solution.SolutionFileName.ToString(), buildConfiguration); task.UseSolutionDirAsWorkingDir = useSolutionDirAsMsBuildWorkingDir; task.MaxCpuCount = context.Properties.Get(BuildProps.CompileMaxCpuCount, 3); task.Execute(context); }