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