public void Dispose() { if (string.IsNullOrEmpty(CommonRoot) && Directory.Exists(CommonRoot)) { TestRepoUtils.KillSpecificExecutable(Path.Combine(CommonDotnetRoot, TestRepoUtils.DotNetHostExecutableName)); // Delete the main root Directory.Delete(Directory.GetParent(CommonRoot).FullName, true); } }
public void Cleanup() { // Workaround to the fact that the .dotnet cannot be easily // placed outside the repo at the current time. string potentialDotNetExe = Path.Combine(TestRepoRoot, ".dotnet", TestRepoUtils.DotNetHostExecutableName); if (File.Exists(potentialDotNetExe)) { TestRepoUtils.KillSpecificExecutable(potentialDotNetExe); } if (DeleteOnDispose) { Directory.Delete(TestRepoRoot, true); } }