105 references to FileUtilities
Microsoft.Build.Engine.OM.UnitTests (105)
BuildEnvironmentHelper.cs (9)
150var vsRoot = FileUtilities.GetFolderAbove(vsProcess, 3); 202var msBuildExe = Path.Combine(FileUtilities.GetFolderAbove(buildAssembly), "MSBuild.exe"); 203var msBuildDll = Path.Combine(FileUtilities.GetFolderAbove(buildAssembly), "MSBuild.dll"); 360return FileUtilities.GetFolderAbove(msBuildAssembly, 369return FileUtilities.CombinePaths( 445return FileUtilities.ExecutingAssemblyPath; 604var potentialAmd64FromX86 = FileUtilities.CombinePaths(MSBuildToolsDirectoryRoot, "amd64", msBuildExeName); 605var potentialARM64FromX86 = FileUtilities.CombinePaths(MSBuildToolsDirectoryRoot, "arm64", msBuildExeName); 677defaultSdkPath = FileUtilities.CombinePaths(VisualStudioInstallRootDirectory, "MSBuild", "Sdks");
Construction\ProjectFormatting_Tests.cs (2)
687var file = FileUtilities.GetTemporaryFileName(".proj"); 713FileUtilities.DeleteDirectoryNoThrow(Path.GetDirectoryName(file), false);
Construction\ProjectImportElement_Tests.cs (4)
162file1 = Microsoft.Build.Shared.FileUtilities.GetTemporaryFileName(); 167file2 = Microsoft.Build.Shared.FileUtilities.GetTemporaryFileName(); 206file = Microsoft.Build.Shared.FileUtilities.GetTemporaryFileName(); 270FileUtilities.DeleteWithoutTrailingBackslash(testTempPath, true);
Construction\ProjectRootElement_Tests.cs (13)
176projectXml1.Save(FileUtilities.GetTemporaryFileName()); 260projectXml1.FullPath = Microsoft.Build.Shared.FileUtilities.GetTemporaryFile(); 432path = Microsoft.Build.Shared.FileUtilities.GetTemporaryFileName(); 464path = FileUtilities.GetTemporaryFileName(); 501path = FileUtilities.GetTemporaryFileName(); 606file = FileUtilities.GetTemporaryFileName(); 650FileUtilities.DeleteWithoutTrailingBackslash(directory, true); 682FileUtilities.DeleteWithoutTrailingBackslash(directory, true); 733string projectFullPath = FileUtilities.GetTemporaryFileName(); 763project.FullPath = FileUtilities.GetTemporaryFile(); 997solutionFile = Microsoft.Build.Shared.FileUtilities.GetTemporaryFileName(); 1927using (var reader = FileUtilities.OpenRead(projectFullPath, encoding, true)) 1966using (StreamWriter writer = FileUtilities.OpenWrite(projectFullPath, false, encoding))
Construction\SolutionFile_Tests.cs (1)
689TransientTestFile sln = testEnvironment.CreateFile(FileUtilities.GetTemporaryFileName(".sln"), solutionFileContents);
Construction\WhiteSpacePreservation_Tests.cs (2)
464var file = FileUtilities.GetTemporaryFileName(); 484FileUtilities.DeleteNoThrow(file);
DebugUtils.cs (5)
32string environmentDebugPath = FileUtilities.TrimAndStripAnyQuotes(Environment.GetEnvironmentVariable("MSBUILDDEBUGPATH")); 37if (!string.IsNullOrWhiteSpace(debugDirectory) && FileUtilities.CanWriteToDirectory(debugDirectory)) 41else if (FileUtilities.CanWriteToDirectory(Directory.GetCurrentDirectory())) 47debugDirectory = Path.Combine(FileUtilities.TempFileDirectory, "MSBuild_Logs"); 59FileUtilities.EnsureDirectoryExists(debugDirectory);
Definition\Project_Tests.cs (29)
184file = FileUtilities.GetTemporaryFileName(); 411file = FileUtilities.GetTemporaryFileName(); 438file = FileUtilities.GetTemporaryFileName(); 439file2 = FileUtilities.GetTemporaryFileName(); 474file = FileUtilities.GetTemporaryFileName(); 475file2 = FileUtilities.GetTemporaryFileName(); 511file = FileUtilities.GetTemporaryFileName(); 512file2 = FileUtilities.GetTemporaryFileName(); 513file3 = FileUtilities.GetTemporaryFileName(); 649file = FileUtilities.GetTemporaryFileName(); 654Path.Combine(FileUtilities.TempFileDirectory, "obj", "i386", "foo.dll")); 715file = FileUtilities.GetTemporaryFile(); 721project.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(FileUtilities.TempFileDirectory, "obj", "i386").Substring(RootPrefixLength) + Path.DirectorySeparatorChar); 722projectInstance.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(FileUtilities.TempFileDirectory, "obj", "i386").Substring(RootPrefixLength) + Path.DirectorySeparatorChar); 751file = FileUtilities.GetTemporaryFile(); 757project.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(FileUtilities.TempFileDirectory, "obj", "i386").Substring(RootPrefixLength) + Path.DirectorySeparatorChar); 758projectInstance.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(FileUtilities.TempFileDirectory, "obj", "i386").Substring(RootPrefixLength) + Path.DirectorySeparatorChar); 789file = FileUtilities.GetTemporaryFile(); 796project.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(FileUtilities.TempFileDirectory /* remove c:\ */, "obj", "i386")); 797projectInstance.GetItems("BuiltProjectOutputGroupKeyOutput").First().EvaluatedInclude.ShouldBe(Path.Combine(FileUtilities.TempFileDirectory /* remove c:\ */, "obj", "i386")); 1363path = FileUtilities.GetTemporaryFileName(); 1391path = FileUtilities.GetTemporaryFileName(); 1780FileUtilities.DeleteWithoutTrailingBackslash(testFileRoot); 2092string importFileName = Microsoft.Build.Shared.FileUtilities.GetTemporaryFileName() + ".proj"; 2191file = FileUtilities.GetTemporaryFileName(); 2516FileUtilities.DeleteWithoutTrailingBackslash(directory, true); 2637FileUtilities.DeleteWithoutTrailingBackslash(myTempDir, true); 3353AssertProvenanceResult(expected, project, FileUtilities.GetIsFileSystemCaseSensitive() ? "a" : "A"); 4271file = FileUtilities.GetTemporaryFileName();
Definition\ProjectCollection_Tests.cs (14)
66path = FileUtilities.GetTemporaryFileName(); 98path = FileUtilities.GetTemporaryFileName(); 127path = FileUtilities.GetTemporaryFileName(); 299path = FileUtilities.GetTemporaryFileName(); 343path = FileUtilities.GetTemporaryFileName(); 832file1 = FileUtilities.GetTemporaryFileName(); 833file2 = FileUtilities.GetTemporaryFileName(); 871file1 = FileUtilities.GetTemporaryFileName(); 872file2 = FileUtilities.GetTemporaryFileName(); 914file1 = FileUtilities.GetTemporaryFileName(); 915file2 = FileUtilities.GetTemporaryFileName(); 1360pre.FullPath = FileUtilities.GetTemporaryFile(); 1423pre.FullPath = FileUtilities.GetTemporaryFile(); 1463string path = FileUtilities.GetTemporaryFileName();
Definition\ProjectItem_Tests.cs (10)
324path = Microsoft.Build.Shared.FileUtilities.GetTemporaryFileName(); 379FileUtilities.DeleteWithoutTrailingBackslash(subdirectory); 380FileUtilities.DeleteWithoutTrailingBackslash(directory); 426FileUtilities.DeleteWithoutTrailingBackslash(subdirectory); 427FileUtilities.DeleteWithoutTrailingBackslash(directory); 2011FileUtilities.DeleteWithoutTrailingBackslash(projectDirectory, recursive: true); 2058file = Microsoft.Build.Shared.FileUtilities.GetTemporaryFileName(); 2089file = Microsoft.Build.Shared.FileUtilities.GetTemporaryFileName(); 2120file = Microsoft.Build.Shared.FileUtilities.GetTemporaryFileName(); 2483if (FileUtilities.GetIsFileSystemCaseSensitive())
Definition\ProjectItemDefinition_Tests.cs (2)
125file = Microsoft.Build.Shared.FileUtilities.GetTemporaryFile(); 155file = Microsoft.Build.Shared.FileUtilities.GetTemporaryFile();
Definition\ProjectProperty_Tests.cs (1)
265file = Microsoft.Build.Shared.FileUtilities.GetTemporaryFileName();
Definition\ProtectImports_Tests.cs (1)
107_importFilename = Microsoft.Build.Shared.FileUtilities.GetTemporaryFileName() + ".targets";
ErrorUtilities.cs (1)
543if (FileUtilities.PathIsInvalid(parameter))
ExceptionHandling.cs (3)
74: FileUtilities.TempFileDirectory; 359using (StreamWriter writer = FileUtilities.OpenWrite(s_dumpFileName, append: true)) 366using (StreamWriter writer = FileUtilities.OpenWrite(s_dumpFileName, append: true))
FileUtilities.cs (1)
747internal static string ExecutingAssemblyPath => Path.GetFullPath(AssemblyUtilities.GetAssemblyLocation(typeof(FileUtilities).GetTypeInfo().Assembly));
Instance\ProjectInstance_Tests.cs (1)
318FileUtilities.DeleteWithoutTrailingBackslash(directory);
Instance\ProjectTargetInstance_Tests.cs (1)
115path = Microsoft.Build.Shared.FileUtilities.GetTemporaryFileName();
PrintLineDebuggerWriters.cs (1)
74var executingAssembly = FileUtilities.ExecutingAssemblyPath;
TempFileUtilities.cs (1)
74return FileUtilities.EnsureTrailingSlash(basePath);
TestAssemblyInfo.cs (1)
76FileUtilities.ClearTempFileDirectory();
TransientIO.cs (2)
27: FileUtilities.GetTemporaryDirectory(true)); 118FileUtilities.DeleteDirectoryNoThrow(this.root.FullName, true);