public void IfToolsVersionIsNotSpecifiedUseHighestOne() { SetupMsBuildVersions(); SetupRunProgramTask(); _task = new CompileSolutionTask("x.sln", "Release", _flubuEnviroment.Object); _task.ExecuteVoid(Context.Object); }
public void ToolsVersionWasNotFoundButThereIsNewerOne() { SetupMsBuildVersions(include40: false); SetupRunProgramTask(); _task = new CompileSolutionTask("x.sln", "Release", _flubuEnviroment.Object); _task.SetToolsVersion(new Version("4.0")); _task.ExecuteVoid(Context.Object); }
public void ExactToolsVersionWasFound() { SetupMsBuildVersions(); SetupRunProgramTask(); _task = new CompileSolutionTask("x.sln", "Release", _flubuEnviroment.Object); _task.SetToolsVersion(new Version("4.0")); _task.ExecuteVoid(Context.Object); }
public void ToolsVersionWasNotFoundAndThereIsNoNewerOne() { SetupMsBuildVersions(include40: false, include120: false); _task = new CompileSolutionTask("x.sln", "Release", _flubuEnviroment.Object); _task.SetToolsVersion(new Version("4.0")); TaskExecutionException ex = Assert.Throws <TaskExecutionException>(() => _task.ExecuteVoid(Context.Object)); Assert.Equal("Requested MSBuild tools version 4.0 not found and there are no higher versions", ex.Message); }