3 writes to Path
Microsoft.Build.UnitTests.Shared (3)
TestEnvironment.cs (3)
686
Path
= FileUtilities.GetTemporaryFile(null, null, extension, createFile);
693
Path
= FileUtilities.GetTemporaryFile(rootPath, null, extension, createFile);
698
Path
= System.IO.Path.Combine(rootPath, fileName);
490 references to Path
Microsoft.Build.BuildCheck.UnitTests (21)
EndToEndTests.cs (21)
53
string output = RunnerUtilities.ExecBootstrapedMSBuild($"{projectFile.
Path
} -check", out bool success);
342
string output = RunnerUtilities.ExecBootstrapedMSBuild($"{projectFile.
Path
} -check", out bool success);
416
string output = RunnerUtilities.ExecBootstrapedMSBuild($"{projectFile.
Path
}", out bool success);
425
output = RunnerUtilities.ExecBootstrapedMSBuild($"{projectFile.
Path
} -check", out success);
441
File.AppendAllText(editorconfigFile.
Path
, editorConfigChange);
444
output = RunnerUtilities.ExecBootstrapedMSBuild($"{projectFile.
Path
} -check", out success);
454
output = RunnerUtilities.ExecBootstrapedMSBuild($"{projectFile.
Path
}", out success);
473
$"{Path.GetFileName(projectFile.
Path
)} /m:1 -nr:False -restore" +
508
var projectDirectory = Path.GetDirectoryName(projectFile.
Path
);
509
string logFile = _env.ExpectFile(".binlog").
Path
;
512
$"{Path.GetFileName(projectFile.
Path
)} /m:1 -nr:False -restore {(checkRequested ? "-check" : string.Empty)} -bl:{logFile}",
563
$"{Path.GetFileName(projectFile.
Path
)} /m:1 -nr:False -restore -check",
622
string? projectDirectory = Path.GetDirectoryName(projectFile.
Path
);
623
string logFile = _env.ExpectFile(".binlog").
Path
;
626
$"{Path.GetFileName(projectFile.
Path
)} /m:1 -nr:False -restore -bl:{logFile}",
677
$"{Path.GetFileName(projectFile.
Path
)} /m:1 -nr:False -restore -check", out bool success, false, _env.Output);
713
$"{Path.GetFileName(projectFile.
Path
)} /m:1 -nr:False -restore -check", out bool success, false, _env.Output);
737
$"{Path.GetFileName(projectFile.
Path
)} /m:1 -nr:False -restore -check" +
860
$"{Path.GetFileName(projectFile.
Path
)} /m:1 -nr:False -t:restore -check",
964
_env.SetCurrentDirectory(Path.GetDirectoryName(projectFile.
Path
));
975
.Replace("TestFilePath", testFile.
Path
)
Microsoft.Build.CommandLine.UnitTests (46)
MSBuildServer_Tests.cs (25)
97
string output = RunnerUtilities.ExecMSBuild(BuildEnvironmentHelper.Instance.CurrentMSBuildExePath, project.
Path
, out bool success, false, _output);
103
output = RunnerUtilities.ExecMSBuild(BuildEnvironmentHelper.Instance.CurrentMSBuildExePath, project.
Path
, out success, false, _output);
112
string? dir = Path.GetDirectoryName(markerFile.
Path
);
116
_output.WriteLine($"The marker file {markerFile.
Path
} was created. The build task has been started. Ready to kill the server.");
121
watcher.Filter = Path.GetFileName(markerFile.
Path
);
125
TransientTestFile sleepProject = _env.CreateFile("napProject.proj", string.Format(sleepingTaskContentsFormat, markerFile.
Path
));
126
RunnerUtilities.ExecMSBuild(BuildEnvironmentHelper.Instance.CurrentMSBuildExePath, sleepProject.
Path
, out _);
129
output = RunnerUtilities.ExecMSBuild(BuildEnvironmentHelper.Instance.CurrentMSBuildExePath, project.
Path
, out success, false, _output);
147
string output = RunnerUtilities.ExecMSBuild(BuildEnvironmentHelper.Instance.CurrentMSBuildExePath, project.
Path
, out bool success, false, _output);
156
output = RunnerUtilities.ExecMSBuild(BuildEnvironmentHelper.Instance.CurrentMSBuildExePath, project.
Path
, out success, false, _output);
163
output = RunnerUtilities.ExecMSBuild(BuildEnvironmentHelper.Instance.CurrentMSBuildExePath, project.
Path
, out success, false, _output);
184
TransientTestFile sleepProject = _env.CreateFile("napProject.proj", string.Format(sleepingTaskContentsFormat, markerFile.
Path
));
189
string output = RunnerUtilities.ExecMSBuild(BuildEnvironmentHelper.Instance.CurrentMSBuildExePath, project.
Path
, out bool success, false, _output);
193
string? dir = Path.GetDirectoryName(markerFile.
Path
);
198
_output.WriteLine($"The marker file {markerFile.
Path
} was created. The build task has been started.");
201
watcher.Filter = Path.GetFileName(markerFile.
Path
);
205
RunnerUtilities.ExecMSBuild(BuildEnvironmentHelper.Instance.CurrentMSBuildExePath, sleepProject.
Path
, out _, false, _output);
215
output = RunnerUtilities.ExecMSBuild(BuildEnvironmentHelper.Instance.CurrentMSBuildExePath, project.
Path
, out success, false, _output);
221
output = RunnerUtilities.ExecMSBuild(BuildEnvironmentHelper.Instance.CurrentMSBuildExePath, project.
Path
, out success, false, _output);
244
string output = RunnerUtilities.ExecMSBuild(BuildEnvironmentHelper.Instance.CurrentMSBuildExePath, project.
Path
, out bool success, false, _output);
281
string output = RunnerUtilities.ExecMSBuild(BuildEnvironmentHelper.Instance.CurrentMSBuildExePath, project.
Path
+ " /nodereuse:false", out bool success, false, _output);
294
string output = RunnerUtilities.ExecMSBuild(BuildEnvironmentHelper.Instance.CurrentMSBuildExePath, project.
Path
+ " -interactive", out bool success, false, _output);
325
string output = RunnerUtilities.ExecMSBuild(BuildEnvironmentHelper.Instance.CurrentMSBuildExePath, $"/t:DisplayMessages {project.
Path
}", out bool success, false, _output);
332
_env.SetCurrentDirectory(Path.GetDirectoryName(project.
Path
));
333
output = RunnerUtilities.ExecMSBuild(BuildEnvironmentHelper.Instance.CurrentMSBuildExePath, $"/t:DisplayMessages {project.
Path
}", out success, false, _output);
TerminalLogger_Tests.cs (4)
729
string logFileWithTL = env.ExpectFile(".binlog").
Path
;
730
string logFileWithoutTL = env.ExpectFile(".binlog").
Path
;
733
RunnerUtilities.ExecMSBuild($"{projectFile.
Path
} /m /bl:{logFileWithTL} -flp:logfile={Path.Combine(logFolder.Path, "logFileWithTL.log")};verbosity=diagnostic -tl:on", out bool success);
737
RunnerUtilities.ExecMSBuild($"{projectFile.
Path
} /m /bl:{logFileWithoutTL} -flp:logfile={Path.Combine(logFolder.Path, "logFileWithoutTL.log")};verbosity=diagnostic", out success);
XMake_Tests.cs (17)
713
string result = RunnerUtilities.ExecMSBuild($" {project.
Path
} -getProperty:Foo", out bool success);
780
string results = RunnerUtilities.ExecMSBuild($" {project.
Path
} {extraSwitch} {graph}", out bool success);
808
string results = RunnerUtilities.ExecMSBuild($" {project.
Path
} /p:someProperty:fdalse= ", out bool success);
834
string resultFile = env.GetTempFile(".tmp").
Path
;
835
string results = RunnerUtilities.ExecMSBuild($" {project.
Path
} {extraSwitch} -getResultOutputFile:{resultFile}", out bool success);
840
result = RunnerUtilities.ExecMSBuild($" {project.
Path
} {extraSwitch} -getResultOutputFile:", out success);
867
string result = RunnerUtilities.ExecMSBuild($" {project.
Path
} /restore {graph}", out bool success);
1305
var projectPath = directory.CreateFile("my.proj", content).
Path
;
1322
var projectPath = directory.CreateFile("my.proj", content).
Path
;
1343
var projectPath = directory.CreateFile("my.proj", content).
Path
;
1440
var projectPath = directory.CreateFile("my.proj", content).
Path
;
1459
var projectPath = directory.CreateFile("my.proj", content).
Path
;
1496
var projectPath = directory.CreateFile("my.proj", content).
Path
;
1518
var projectPath = directory.CreateFile("my.proj", content).
Path
;
2484
var parametersLoggerOptional = $"{logger} -verbosity:diagnostic \"{projectFile.
Path
}\"";
2536
string output = RunnerUtilities.ExecMSBuild($"\"{testProject.
Path
}\" \"/bl:{binLogLocation}/output.binlog\"", out var success, _output);
2610
string output = RunnerUtilities.ExecMSBuild($"\"{testSolution.
Path
}\" /p:Configuration=Debug", out var success, _output);
Microsoft.Build.Engine.OM.UnitTests (21)
Construction\ProjectRootElement_Tests.cs (2)
1744
initialLocation = env.CreateFile().
Path
;
1760
reloadLocation = env.CreateFile().
Path
;
Construction\ProjectTargetElement_Tests.cs (1)
360
collection.LoadProject(file.
Path
).Build().ShouldBeTrue();
Construction\SolutionFile_Tests.cs (2)
691
string solutionPath = convertToSlnx ? ConvertToSlnx(sln.
Path
) : sln.
Path
;
Definition\Project_Tests.cs (15)
3892
ProjectRootElement pre = ProjectRootElement.Create(env.CreateFile(".proj").
Path
);
3935
ProjectRootElement pre = ProjectRootElement.Create(env.CreateFile(".proj").
Path
);
3978
File.WriteAllText(importFile.
Path
, contents);
3979
ProjectRootElement pre = ProjectRootElement.Create(env.CreateFile(".proj").
Path
);
3982
var import = pre.AddImport(importFile.
Path
);
4001
eventArgs.ImportedProjectFile.ShouldBe(importFile.
Path
);
4025
File.WriteAllText(importFile.
Path
, contents);
4026
ProjectRootElement pre = ProjectRootElement.Create(env.CreateFile(".proj").
Path
);
4029
var import = pre.AddImport(importFile.
Path
);
4048
eventArgs.ImportedProjectFile.ShouldBe(importFile.
Path
);
4067
ProjectRootElement pre = ProjectRootElement.Create(env.CreateFile(".proj").
Path
);
4107
ProjectRootElement pre = ProjectRootElement.Create(env.CreateFile(".proj").
Path
);
4150
ProjectRootElement pre = ProjectRootElement.Create(env.CreateFile(".proj").
Path
);
4195
ProjectRootElement pre1 = ProjectRootElement.Create(env.CreateFile(".proj").
Path
);
4196
ProjectRootElement pre2 = ProjectRootElement.Create(env.CreateFile(".proj").
Path
);
NugetRestoreTests.cs (1)
50
RunnerUtilities.RunProcessAndGetOutput(Path.Combine(msbuildExePath, "nuget", "NuGet.exe"), "restore " + sln.
Path
+ " -MSBuildPath \"" + msbuildExePath + "\"", out bool success, outputHelper: _output);
Microsoft.Build.Engine.UnitTests (270)
BackEnd\BuildManager_Tests.cs (54)
741
string tempProject = _env.CreateFile(".proj").
Path
;
990
var result = buildManagerSession.BuildProjectFile(_env.CreateFile("build.proj", contents).
Path
);
1877
string projectFile = _env.CreateFile(projectFolder, ".proj").
Path
;
2008
string p2pProject = _env.CreateFile(".Project2.proj").
Path
;
2094
string importedProjectPath = _env.CreateFile(".proj").
Path
;
2095
string rootProjectPath = _env.CreateFile(".proj").
Path
;
2195
string fileName = _env.CreateFile(".proj").
Path
;
2263
string fileName = _env.CreateFile(".proj").
Path
;
2314
string fileName = _env.CreateFile(".proj").
Path
;
2382
var projA = _env.CreateFile(".proj").
Path
;
2383
var projB = _env.CreateFile(".proj").
Path
;
2431
var projA = _env.CreateFile(".proj").
Path
;
2432
var projB = _env.CreateFile(".proj").
Path
;
2497
var projA = _env.CreateFile(".proj").
Path
;
2498
var projB = _env.CreateFile(".proj").
Path
;
2547
var projA = _env.CreateFile(".proj").
Path
;
2548
var projB = _env.CreateFile(".proj").
Path
;
2599
var projA = _env.CreateFile(".proj").
Path
;
2600
var projB = _env.CreateFile(".proj").
Path
;
2601
var projC = _env.CreateFile(".proj").
Path
;
2602
var projD = _env.CreateFile(".proj").
Path
;
2694
var projA = _env.CreateFile(".proj").
Path
;
2695
var projB = _env.CreateFile(".proj").
Path
;
2696
var projC = _env.CreateFile(".proj").
Path
;
2773
var projA = _env.CreateFile(".proj").
Path
;
2774
var projB = _env.CreateFile(".proj").
Path
;
2775
var projC = _env.CreateFile(".proj").
Path
;
2888
var projA = _env.CreateFile(".proj").
Path
;
2889
var projB = _env.CreateFile(".proj").
Path
;
2890
var projC = _env.CreateFile(".proj").
Path
;
2974
var projA = _env.CreateFile(".proj").
Path
;
2975
var projB = _env.CreateFile(".proj").
Path
;
2976
var projC = _env.CreateFile(".proj").
Path
;
3043
var projA = _env.CreateFile(".proj").
Path
;
3044
var projB = _env.CreateFile(".proj").
Path
;
3118
var projectPath1 = _env.CreateFile(".proj").
Path
;
3123
var projectPath2 = _env.CreateFile(".proj").
Path
;
3186
var projectPath1 = _env.CreateFile(".proj").
Path
;
3201
var projectPath2 = _env.CreateFile(".proj").
Path
;
3271
string projectPath1 = _env.CreateFile(".proj").
Path
;
3286
var projectPath2 = _env.CreateFile(".proj").
Path
;
3369
string fileName = _env.CreateFile(".proj").
Path
;
3587
var projectFilePath = _env.CreateFile().
Path
;
3600
project.FullPath = _env.CreateFile().
Path
;
4027
var entryFile = env.CreateFile(nameof(a), a).
Path
;
4183
string project1 = _env.CreateFile(".proj").
Path
;
4184
string project2 = _env.CreateFile(".proj").
Path
;
4224
string project1 = _env.CreateFile(".proj").
Path
;
4225
string project2 = _env.CreateFile(".proj").
Path
;
4226
string project3 = _env.CreateFile(".proj").
Path
;
4266
string project1 = _env.CreateFile(".proj").
Path
;
4267
string project2 = _env.CreateFile(".proj").
Path
;
4309
string project1 = _env.CreateFile(".proj").
Path
;
4310
string project2 = _env.CreateFile(".proj").
Path
;
BackEnd\GenerateTemporaryTargetAssembly_Tests.cs (1)
31
<FailingBuilderTask CurrentProject=""{otherproj.
Path
}"" />
BackEnd\IntrinsicTask_Tests.cs (2)
2528
var file1 = env.CreateFile(projectDirectory).
Path
;
2529
var file2 = env.CreateFile(projectDirectory).
Path
;
BackEnd\MSBuild_Tests.cs (3)
795
ObjectModelHelpers.BuildTempProjectFileExpectSuccess(projectFile.
Path
, logger);
827
ObjectModelHelpers.BuildTempProjectFileExpectSuccess(projectFile.
Path
, logger);
874
ObjectModelHelpers.BuildTempProjectFileExpectSuccess(projectFile.
Path
, logger);
BackEnd\SdkResolverLoader_Tests.cs (4)
224
var assemblyToLoad = env.CreateFile(".dll").
Path
;
249
var assemblyToLoad = env.CreateFile(".dll").
Path
;
276
var assemblyToLoad = env.CreateFile(".dll").
Path
;
317
var assemblyToLoad = env.GetTempFile(".dll").
Path
;
BackEnd\TaskBuilder_Tests.cs (2)
103
string results = RunnerUtilities.ExecMSBuild(projectFile.
Path
+ " /v:diag", out bool success);
170
project.FullPath = env.CreateFile().
Path
;
BackEnd\TaskHostFactory_Tests.cs (1)
45
ProjectInstance projectInstance = new(project.
Path
);
BinaryLogger_Tests.cs (11)
87
_logFile = _env.ExpectFile(".binlog").
Path
;
138
fileToReplay = _env.ExpectFile(".binlog").
Path
;
228
string replayedLogFile = _env.ExpectFile(".binlog").
Path
;
356
RunnerUtilities.ExecMSBuild($"{projectFile.
Path
} -bl:{_logFile}", out bool success);
416
RunnerUtilities.ExecMSBuild($"{projectFile.
Path
} -nr:False -bl:{_logFile} -flp1:logfile={Path.Combine(logFolder.Path, "logFile.log")};verbosity=diagnostic -flp2:logfile={Path.Combine(logFolder.Path, "logFile2.log")};verbosity=normal", out bool success);
481
string emptyFile = testFolder.CreateFile(emptyFileName).
Path
;
484
Assert.True(NativeMethodsShared.MakeSymbolicLink(symlinkPath, testFile.
Path
, ref errorMessage), errorMessage);
626
string consoleOutput1 = RunnerUtilities.ExecMSBuild($"{projectFile1.
Path
} -bl:{_logFile} -verbosity:diag -nologo", out bool success1);
628
var expected1 = $"-nologo -bl:{_logFile} -verbosity:diag {projectFile1.
Path
}";
634
string consoleOutput2 = RunnerUtilities.ExecMSBuild($"{projectFile2.
Path
} -bl:{_logFile} -verbosity:{verbosity} -nologo", out bool success2);
636
var expected2 = $"-nologo -bl:{_logFile} -verbosity:{verbosity} {projectFile2.
Path
}";
ChangeWaves_Tests.cs (1)
65
Project p = collection.LoadProject(file.
Path
);
Construction\ProjectImportElement_Tests.cs (3)
28
ProjectRootElement rootElement = ProjectRootElement.Open(projectFile.
Path
);
65
ProjectRootElement rootElement = ProjectRootElement.Open(projectFile.
Path
);
124
rootElement.Save(env.GetTempFile(".csproj").
Path
);
Construction\SolutionFile_NewParser_Tests.cs (2)
140
string solutionPath = convertToSlnx ? ConvertToSlnx(sln.
Path
) : sln.
Path
;
Construction\SolutionFile_OldParser_Tests.cs (2)
313
string rptprojPath = env.CreateFile(".rptproj").
Path
;
315
string dqprojPath = env.CreateFile(".dwproj").
Path
;
Construction\SolutionFilter_Tests.cs (19)
125
Directory.GetCurrentDirectory().ShouldNotBe(Path.GetDirectoryName(filterFile.
Path
));
131
ProjectGraphEntryPoint entryPoint = new(filterFile.
Path
, new Dictionary<string, string>());
137
graphFromSolution.ProjectNodes.Single().ProjectInstance.ProjectFileLocation.LocationString.ShouldBe(simpleProject.
Path
);
141
SolutionFile solution = SolutionFile.Parse(filterFile.
Path
);
215
TransientTestFile slnf = testEnvironment.CreateFile(folder, "Dev.slnf", slnfValue.Replace(@"C:\\notAPath\\MSBuild.Dev.sln", sln.
Path
.Replace("\\", "\\\\")));
216
InvalidProjectFileException e = Should.Throw<InvalidProjectFileException>(() => SolutionFile.Parse(slnf.
Path
));
244
Project(""{9A19103F-16F7-4668-BE54-9A1E7A4F7556}"") = ""Microsoft.Build"", """ + Path.Combine("src", Path.GetFileName(microsoftBuild.
Path
)) + @""", ""{69BE05E2-CBDA-4D27-9733-44E12B0F5627}""
246
Project(""{9A19103F-16F7-4668-BE54-9A1E7A4F7556}"") = ""MSBuild"", """ + Path.Combine("src", Path.GetFileName(msbuild.
Path
)) + @""", ""{6F92CA55-1D15-4F34-B1FE-56C0B7EB455E}""
248
Project(""{9A19103F-16F7-4668-BE54-9A1E7A4F7556}"") = ""Microsoft.Build.CommandLine.UnitTests"", """ + Path.Combine("src", Path.GetFileName(commandLineUnitTests.
Path
)) + @""", ""{0ADDBC02-0076-4159-B351-2BF33FAA46B2}""
250
Project(""{9A19103F-16F7-4668-BE54-9A1E7A4F7556}"") = ""Microsoft.Build.Tasks.UnitTests"", """ + Path.Combine("src", Path.GetFileName(tasksUnitTests.
Path
)) + @""", ""{CF999BDE-02B3-431B-95E6-E88D621D9CBF}""
268
""path"": """ + (convertToSlnx ? ConvertToSlnx(sln.
Path
) : sln.
Path
).Replace("\\", "\\\\") + @""",
270
""" + Path.Combine("src", Path.GetFileName(microsoftBuild.
Path
)!).Replace("\\", "\\\\") + @""",
271
""" + Path.Combine("src", Path.GetFileName(tasksUnitTests.
Path
)!).Replace("\\", "\\\\") + @"""
275
SolutionFile sp = SolutionFile.Parse(slnf.
Path
);
276
sp.ProjectShouldBuild(Path.Combine("src", Path.GetFileName(microsoftBuild.
Path
)!)).ShouldBeTrue();
277
sp.ProjectShouldBuild(Path.Combine("src", Path.GetFileName(tasksUnitTests.
Path
)!)).ShouldBeTrue();
280
(sp.ProjectShouldBuild(Path.Combine("src", Path.GetFileName(commandLineUnitTests.
Path
)!))
281
|| sp.ProjectShouldBuild(Path.Combine("src", Path.GetFileName(msbuild.
Path
)!))
Construction\SolutionProjectGenerator_Tests.cs (8)
78
ProjectInstance[] instances = SolutionProjectGenerator.Generate(SolutionFile.Parse(sln.
Path
), null, null, _buildEventContext, CreateMockLoggingService());
123
RunnerUtilities.ExecMSBuild(solutionFile.
Path
+ " /t:classlib", out bool success);
192
string output = RunnerUtilities.ExecMSBuild(solutionFile.
Path
+ " /t:Clean;Build;Custom", out bool success);
271
var output = RunnerUtilities.ExecMSBuild(solutionFile.
Path
+ " /m /t:Clean;Build;Custom", out bool success);
890
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "A", "{{proj1.
Path
}}", "{786E302A-96CE-43DC-B640-D6B6CC9BF6C0}"
892
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "B", "{{proj2.
Path
}}", "{881C1674-4ECA-451D-85B6-D7C59B7F16FA}"
897
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C", "{{proj3.
Path
}}", "{4A727FF8-65F2-401E-95AD-7C8BBFBE3167}"
900
RunnerUtilities.ExecMSBuild("\"" + proj.
Path
+ "\"", out bool successfulExit);
Definition\Project_Internal_Tests.cs (3)
277
projectRootElement.Save(testEnvironment.CreateFile().
Path
);
305
projectRootElement.Save(testEnvironment.CreateFile().
Path
);
333
projectRootElement.Save(testEnvironment.CreateFile().
Path
);
Definition\ProjectEvaluationContext_Tests.cs (6)
100
_env.CreateFile("1.proj", @"<Project> <PropertyGroup Condition=`Exists('1.file')`></PropertyGroup> </Project>".Cleanup()).
Path
,
101
_env.CreateFile("2.proj", @"<Project> <PropertyGroup Condition=`Exists('2.file')`></PropertyGroup> </Project>".Cleanup()).
Path
144
var projectFile = _env.CreateFile("1.proj", @"<Project> <Import Project='1.file' Condition=`Exists('1.file')`/> <ItemGroup><Compile Include='*.cs'/></ItemGroup> </Project>".Cleanup()).
Path
;
932
searchedPath.EvaluatedValue.ShouldBe(subdirectoryFile.
Path
);
938
? subdirectoryFile.
Path
939
: rootFile.
Path
);
Evaluation\EvaluationLogging_Tests.cs (2)
77
var importFile = env.CreateFile().
Path
;
82
var projectFile = env.CreateFile().
Path
;
Evaluation\Evaluator_Tests.cs (3)
66
Assert.Throws<InvalidProjectFileException>(() => collection.LoadProject(projectFile.
Path
));
90
Project project = new(projectFile.
Path
);
5025
Project project = pc.LoadProject(tempPath.
Path
);
Evaluation\Expander_Tests.cs (10)
4798
ProjectInstance projectInstance = new ProjectInstance(projectFile.
Path
);
4842
ProjectInstance projectInstance = new ProjectInstance(projectFile.
Path
);
4871
ProjectInstance projectInstance = new ProjectInstance(projectFile.
Path
);
4918
ProjectInstance projectInstance = new ProjectInstance(projectFile.
Path
);
4959
ProjectInstance projectInstance = new ProjectInstance(projectFile.
Path
);
4993
ProjectInstance projectInstance = new ProjectInstance(projectFile.
Path
);
5039
new ProjectInstance(projectFile.
Path
);
5080
new ProjectInstance(projectFile.
Path
);
5112
new ProjectInstance(projectFile.
Path
);
5178
.ExpandIntoStringLeaveEscaped($"$([MSBuild]::RegisterBuildCheck({dummyAssemblyFile.
Path
}))", ExpanderOptions.ExpandProperties, MockElementLocation.Instance);
EvaluationProfiler_Tests.cs (1)
306
project.FullPath = _env.CreateFile().
Path
;
FileLogger_Tests.cs (3)
362
var logFile = env.CreateFile(".log").
Path
;
404
fileLogger.Parameters = "logfile=" + logFile.
Path
;
415
string log = File.ReadAllText(logFile.
Path
);
Graph\GetCompatiblePlatformGraph_Tests.cs (11)
59
ProjectGraph graph = new ProjectGraph(entryProject.
Path
);
99
ProjectGraph graph = new ProjectGraph(entryProject.
Path
);
141
ProjectGraph graph = new ProjectGraph(entryProject.
Path
);
181
ProjectGraph graph = new ProjectGraph(entryProject.
Path
);
210
ProjectGraph graph = new ProjectGraph(entryProject.
Path
);
238
ProjectGraph graph = new ProjectGraph(entryProject.
Path
);
265
ProjectGraph graph = new ProjectGraph(entryProject.
Path
);
293
ProjectGraph graph = new ProjectGraph(entryProject.
Path
);
320
ProjectGraph graph = new ProjectGraph(entryProject.
Path
);
350
ProjectGraph graph = new ProjectGraph(entryProject.
Path
);
442
ProjectGraphEntryPoint entryPoint = new(solutionFile.
Path
, new Dictionary<string, string>());
Graph\GraphLoadedFromSolution_tests.cs (13)
41
files[i] = _env.CreateFile(files[i], string.Empty).
Path
;
69
var solutionFile = _env.CreateFile("solutionReference.sln", string.Empty).
Path
;
83
var aggException = Should.Throw<AggregateException>(() => new ProjectGraph(root.
Path
));
231
{"1", _env.CreateFile("1.csproj", string.Empty).
Path
}
252
var solutionFile = _env.CreateFile("solution.sln", solutionContents).
Path
;
501
var solutionFile = _env.CreateFile("solution.sln", solutionContents).
Path
;
596
var graph = new ProjectGraph(_env.CreateFile("solution.sln", solutionContents).
Path
);
612
{"1", GraphTestingUtilities.CreateProjectFile(_env, 1, new[] {2}).
Path
},
613
{"2", GraphTestingUtilities.CreateProjectFile(_env, 2, extraContent: MultitargetingSpecificationPropertyGroup).
Path
},
614
{"3", GraphTestingUtilities.CreateProjectFile(_env, 3, new[] {4}, extraContent: MultitargetingSpecificationPropertyGroup).
Path
},
615
{"4", GraphTestingUtilities.CreateProjectFile(_env, 4).
Path
}
620
var graph = new ProjectGraph(_env.CreateFile("solution.sln", solutionContents).
Path
);
673
var solutionPath = _env.CreateFile("TheSolution.sln", solutionContents).
Path
;
Graph\IsolateProjects_Tests.cs (8)
288
defaultTargets: "UndeclaredReferenceTarget").
Path
;
303
defaultTargets: "DeclaredReferenceTarget").
Path
;
321
defaultTargets: "BuildDeclaredReference").
Path
;
516
var rootProjectFile = CreateTmpFile(_env).
Path
;
517
var declaredReferenceFile = CreateTmpFile(_env).
Path
;
518
var undeclaredReferenceFile = CreateTmpFile(_env).
Path
;
580
".Cleanup()).
Path
;
597
".Cleanup()).
Path
;
Graph\ProjectGraph_Tests.cs (78)
65
var projectGraph = new ProjectGraph(entryProject.
Path
);
67
projectGraph.ProjectNodes.First().ProjectInstance.FullPath.ShouldBe(entryProject.
Path
);
93
Should.Throw<CircularDependencyException>(() => new ProjectGraph(entryProject.
Path
));
106
entryProject.
Path
,
118
projectGraph.ProjectNodes.First().ProjectInstance.FullPath.ShouldBe(entryProject.
Path
);
208
entryProject.
Path
,
230
ProjectGraph graph = new ProjectGraph(entryProject.
Path
);
259
ProjectGraph graph = new ProjectGraph(entryProject.
Path
);
308
var projectsInCycle = new List<string> { entryProject.
Path
, proj3.
Path
, proj2.
Path
, entryProject.
Path
};
310
Should.Throw<CircularDependencyException>(() => new ProjectGraph(entryProject.
Path
)).Message.ShouldContain(expectedErrorMessage);
322
Should.Throw<CircularDependencyException>(() => new ProjectGraph(entryProject.
Path
));
342
var projectsInCycle = new List<string> { proj2.
Path
, proj3.
Path
, proj7.
Path
, proj6.
Path
, proj2.
Path
};
344
Should.Throw<CircularDependencyException>(() => new ProjectGraph(entryProject.
Path
)).Message.ShouldContain(errorMessage);
357
var entryPoint1 = new ProjectGraphEntryPoint(entryFile1.
Path
, new Dictionary<string, string> { ["B"] = "EntryPointB", ["C"] = "EntryPointC" });
358
var entryPoint2 = new ProjectGraphEntryPoint(entryFile2.
Path
, null);
403
ProjectGraph graph = new ProjectGraph(entryProject.
Path
);
430
ProjectGraph graph = new ProjectGraph(entryProject.
Path
);
461
ProjectGraph graph = new ProjectGraph(entryProject.
Path
);
496
entryProject.
Path
,
532
ProjectGraph graph = new ProjectGraph(entryProject.
Path
);
563
var aggException = Should.Throw<AggregateException>(() => new ProjectGraph(entryProject.
Path
));
578
var projectGraph = new ProjectGraph(new[] { entryProject1.
Path
, entryProject2.
Path
});
598
var entryPoint1 = new ProjectGraphEntryPoint(entryProject.
Path
, new Dictionary<string, string> { { "Platform", "x86" } });
599
var entryPoint2 = new ProjectGraphEntryPoint(entryProject.
Path
, new Dictionary<string, string> { { "Platform", "x64" } });
637
var entryPoint1 = new ProjectGraphEntryPoint(entryProject.
Path
, new Dictionary<string, string> { { "Platform", "x86" } });
638
var entryPoint2 = new ProjectGraphEntryPoint(entryProject.
Path
, new Dictionary<string, string> { { "Platform", "x64" } });
673
var projectGraph = new ProjectGraph(new[] { entryProject1.
Path
, entryProject2.
Path
, entryProject3.
Path
});
818
SolutionFile solutionFile = SolutionFile.Parse(slnFile.
Path
);
861
var projectGraph = new ProjectGraph(slnFile.
Path
);
924
var projectGraph = new ProjectGraph(entryProject.
Path
);
952
var projectGraph = new ProjectGraph(entryProject.
Path
);
983
var projectGraph = new ProjectGraph(entryProject.
Path
);
1005
var projectGraph = new ProjectGraph(entryProject.
Path
);
1023
var projectGraph = new ProjectGraph(entryProject.
Path
);
1046
var projectGraph = new ProjectGraph(entryProject.
Path
);
1069
var projectGraph = new ProjectGraph(entryProject.
Path
);
1086
var projectGraph = new ProjectGraph(entryProject.
Path
);
1106
.
Path
;
1140
.
Path
;
1175
extraContent: ProjectReferenceTargetsWithMultitargeting).
Path
;
1230
.
Path
;
1299
.
Path
;
1313
.
Path
;
1394
var projectGraph = new ProjectGraph(entryProject.
Path
);
1417
var projectGraph = new ProjectGraph(entryProject.
Path
);
1447
var projectGraph = new ProjectGraph(entryProject.
Path
);
1504
var projectGraph = new ProjectGraph(entryProjectFile: entryProject.
Path
);
1632
var graph = new ProjectGraph(new HashSet<string> { entryProject1.
Path
, entryProject2.
Path
});
1901
projectReferences: new[] { 2 }).
Path
;
1935
.
Path
;
1975
var root = CreateProjectFile(_env, 1, new[] { 2 }, null, null, multitargetingSpecification).
Path
;
1994
var root = CreateProjectFile(env: _env, projectNumber: 1, projectReferences: new[] { 2 }, projectReferenceTargets: null, defaultTargets: null, extraContent: MultitargetingSpecificationPropertyGroup).
Path
;
2021
extraContent: innerBuildViaLocalProperty).
Path
;
2041
var root = CreateProjectFile(env: _env, projectNumber: 1, projectReferences: new[] { 2 }, projectReferenceTargets: null, defaultTargets: null, extraContent: MultitargetingSpecificationPropertyGroup).
Path
;
2060
var root = CreateProjectFile(env: _env, projectNumber: 1, projectReferences: new[] { 2, 3 }, projectReferenceTargets: null, defaultTargets: null, extraContent: MultitargetingSpecificationPropertyGroup).
Path
;
2086
var root = CreateProjectFile(env: _env, projectNumber: 1, projectReferences: new[] { 2, 3 }, projectReferenceTargets: null, defaultTargets: null, extraContent: extraInnerBuildReferenceSpec).
Path
;
2129
CreateProjectFile(env: _env, projectNumber: 1, projectReferences: null, projectReferenceTargets: null, defaultTargets: null, extraContent: MultitargetingSpecificationPropertyGroup).
Path
,
2130
CreateProjectFile(env: _env, projectNumber: 2, projectReferences: null, projectReferenceTargets: null, defaultTargets: null, extraContent: referenceToInnerBuild).
Path
2160
var root = CreateProjectFile(env: _env, projectNumber: 1, projectReferences: null, projectReferenceTargets: null, defaultTargets: null, extraContent: referenceToInnerBuild).
Path
;
2200
.
Path
;
2846
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Project1", "{{project1File.
Path
}}", "{8761499A-7280-43C4-A32F-7F41C47CA6DF}"
2848
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Project2", "{{project2File.
Path
}}", "{2022C11A-1405-4983-BEC2-3A8B0233108F}"
2871
SolutionFile solutionFile = SolutionFile.Parse(slnFile.
Path
);
2873
ProjectGraph projectGraph = new(slnFile.
Path
);
2897
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Project1", "{{project1File.
Path
}}", "{8761499A-7280-43C4-A32F-7F41C47CA6DF}"
2916
SolutionFile solutionFile = SolutionFile.Parse(slnFile.
Path
);
2918
ProjectGraph projectGraph = new(slnFile.
Path
);
Graph\ResultCacheBasedBuilds_Tests.cs (8)
55
var project = CreateProjectFileWithBuildTargetAndItems(_env, 1).
Path
;
60
.ToArray())).
Path
;
82
var project = CreateProjectFileWithBuildTargetAndItems(_env, 1).
Path
;
127
var projectFile = CreateProjectFileWithBuildTargetAndItems(_env, 1, null, defaultTargets, explicitTargets).
Path
;
129
var outputCache = _env.DefaultTestDirectory.CreateFile("referenceCache").
Path
;
462
outputCaches[node] = env.DefaultTestDirectory.CreateFile($"OutputCache-{ProjectNumber(node)}").
Path
;
556
var project = CreateProjectFileWithBuildTargetAndItems(_env, 1).
Path
;
557
var existingFile = _env.CreateFile("FileExists", string.Empty).
Path
;
Instance\ProjectInstance_Internal_Tests.cs (3)
765
var file = env.CreateFile().
Path
;
897
projectRootElement.Save(testEnvironment.CreateFile().
Path
);
925
projectRootElement.Save(testEnvironment.CreateFile().
Path
);
ProjectCache\ProjectCacheTests.cs (4)
895
BuildResult buildResult = buildSession.BuildProjectFile(project1.
Path
);
1131
var buildResult = buildSession.BuildProjectFile(project.
Path
);
1347
GraphBuildResult graphResult = buildSession.BuildGraph(new ProjectGraph(project.
Path
));
1580
.Select(i => _env.CreateFile($"project{i}.proj", project).
Path
)
TerminalLoggerConfiguration_Tests.cs (1)
39
_cmd = $"{projectFile.
Path
} -target:Hello -logger:{typeof(MockLogger).FullName},{typeof(MockLogger).Assembly.Location};ReportTelemetry";
Utilities_Tests.cs (3)
94
new[] { @"c:\bin\msbuild.exe", '"' + inputFile.
Path
+ '"',
95
'"' + (NativeMethodsShared.IsUnixLike ? "-pp:" : "/pp:") + outputFile.
Path
+ '"'}));
99
foreach (string line in File.ReadLines(outputFile.
Path
))
Microsoft.Build.Tasks.UnitTests (121)
AddToWin32Manifest_Tests.cs (1)
104
var projectFile = env.CreateFile(projectFolder, "test.csproj", projectContent).
Path
;
AssemblyDependency\ResolveAssemblyReferenceCacheSerialization.cs (6)
125
sysState.SerializeCache(file.
Path
, null);
126
sysState2 = StateFileBase.DeserializeCache<SystemState>(file.
Path
, null);
161
sysState.SerializeCache(file.
Path
, null);
162
sysState2 = StateFileBase.DeserializeCache<SystemState>(file.
Path
, null);
187
sysState.SerializeCache(file.
Path
, null);
188
sysState2 = StateFileBase.DeserializeCache<SystemState>(file.
Path
, null);
CodeTaskFactoryEmbeddedFileInBinlogTestHelper.cs (5)
42
<Code Type="Class" Language="cs" Source="{sourceClass.
Path
}">
58
Parameters = $"LogFile={binlog.
Path
}",
66
string projectImportsZipPath = Path.ChangeExtension(binlog.
Path
, ".ProjectImports.zip");
110
Parameters = $"LogFile={binlog.
Path
}",
118
string projectImportsZipPath = Path.ChangeExtension(binlog.
Path
, ".ProjectImports.zip");
Copy_Tests.cs (17)
150
SourceFiles = new ITaskItem[] { new TaskItem(sourceFile.
Path
) },
175
SourceFiles = new ITaskItem[] { new TaskItem(sourceFile.
Path
) },
273
SourceFiles = new ITaskItem[] { new TaskItem(sourceFile.
Path
) },
346
SourceFiles = new ITaskItem[] { new TaskItem(sourceFile.
Path
) },
370
SourceFiles = new ITaskItem[] { new TaskItem(sourceFile.
Path
) },
394
SourceFiles = new ITaskItem[] { new TaskItem(sourceFile.
Path
) },
417
SourceFiles = new ITaskItem[] { new TaskItem(sourceFile.
Path
) },
442
SourceFiles = new ITaskItem[] { new TaskItem(sourceFile.
Path
) },
468
SourceFiles = new ITaskItem[] { new TaskItem(sourceFile.
Path
) },
2524
var source = env.DefaultTestDirectory.CreateFile("source.txt", "This is a source file").
Path
;
2525
var existing = env.DefaultTestDirectory.CreateFile("destination.txt", "This is an existing file.").
Path
;
2948
ITaskItem[] sourceFiles = { new TaskItem(sourceFile1.
Path
) };
2967
sourceFiles = new TaskItem[] { new TaskItem(sourceFile2.
Path
) };
2985
File.ReadAllText(sourceFile1.
Path
).ShouldBe("This is the first source temp file.");
2989
Path.Combine(Path.GetDirectoryName(sourceFile2.
Path
), ".", Path.GetFileName(sourceFile2.
Path
))) // sourceFile2.Path with a "." inserted before the file name
3002
File.Exists(sourceFile2.
Path
).ShouldBeTrue();
CreateCSharpManifestResourceName_Tests.cs (9)
389
ITaskItem i = new TaskItem(resXFile.
Path
);
424
env.SetCurrentDirectory(Path.GetDirectoryName(resourceFile.
Path
));
492
ITaskItem i = new TaskItem(Path.GetFileName(resXFile.
Path
));
498
env.SetCurrentDirectory(Path.GetDirectoryName(resXFile.
Path
));
527
ITaskItem i = new TaskItem(resXFile.
Path
);
557
ITaskItem i = new TaskItem(Path.GetFileName(resXFile.
Path
));
563
env.SetCurrentDirectory(Path.GetDirectoryName(resXFile.
Path
));
591
ITaskItem i = new TaskItem(resXFile.
Path
);
599
env.SetCurrentDirectory(Path.GetDirectoryName(resXFile.
Path
));
Exec_Tests.cs (1)
1040
var textFilePath = env.CreateFile("leading-whitespace.txt", lineWithLeadingWhitespace).
Path
;
GenerateBindingRedirects_Tests.cs (4)
270
string outputAppConfigFile = env.ExpectFile(".config").
Path
;
282
string outputAppConfigFile = _env.ExpectFile(".config").
Path
;
320
string outputAppConfig = string.IsNullOrEmpty(targetAppConfigFile) ? _env.ExpectFile(".config").
Path
: targetAppConfigFile;
354
string appConfigFile = _env.CreateFile(transientTestFolder ?? new TransientTestFolder(), ".config").
Path
;
HintPathResolver_Tests.cs (3)
35
bool result = ResolveHintPath(tempFile.
Path
);
55
bool result = ResolveHintPath(Environment.NewLine + tempFile.
Path
+ Environment.NewLine);
64
bool result = ResolveHintPath(" " + tempFile.
Path
+ " ");
MSBuildInternalMessage_Tests.cs (5)
45
var projectFile = env.CreateFile(env.CreateFolder(), "test.csproj", projectContent).
Path
;
88
var projectFile = env.CreateFile(env.CreateFolder(), "test.csproj", projectContent).
Path
;
143
var projectFile = env.CreateFile(env.CreateFolder(), "test.csproj", projectContent).
Path
;
218
var projectFile = env.CreateFile(env.CreateFolder(), fileName, projectContent).
Path
;
263
var projectFile = env.CreateFile(env.CreateFolder(), "test.csproj", projectContent).
Path
;
RARPrecomputedCache_Tests.cs (19)
31
{ Path.Combine(standardCache.
Path
, "assembly1"), new SystemState.FileState(now) },
32
{ Path.Combine(standardCache.
Path
, "assembly2"), new SystemState.FileState(now) { Assembly = new Shared.AssemblyNameExtension("hi") } } };
37
t.StateFile = standardCache.
Path
;
39
int standardLen = File.ReadAllText(standardCache.
Path
).Length;
40
File.Delete(standardCache.
Path
);
43
string precomputedPath = standardCache.
Path
+ ".cache";
47
File.Exists(standardCache.
Path
).ShouldBeFalse();
69
rarWriterTask.StateFile = standardCache.
Path
;
75
string dllName = Path.Combine(Path.GetDirectoryName(standardCache.
Path
), "randomFolder", "dll.dll");
84
string precomputedCachePath = standardCache.
Path
+ ".cache";
91
rarReaderTask.StateFile = standardCache.
Path
;
116
string dllName = Path.Combine(Path.GetDirectoryName(precomputedCache.
Path
), "randomFolder", "dll.dll");
118
{ Path.Combine(precomputedCache.
Path
, "..", "assembly1", "assembly1"), new SystemState.FileState(DateTime.Now) },
119
{ Path.Combine(precomputedCache.
Path
, "assembly2"), new SystemState.FileState(DateTime.Now) { Assembly = new Shared.AssemblyNameExtension("hi") } },
126
rarWriterTask.AssemblyInformationCacheOutputPath = precomputedCache.
Path
;
131
File.Delete(precomputedCache.
Path
);
135
rarReaderTask.StateFile = precomputedCache.
Path
.Substring(0, precomputedCache.
Path
.Length - 6); // Not a real path; should not be used.
138
new TaskItem(precomputedCache.
Path
)
ResourceHandling\GenerateResource_Tests.cs (17)
325
string resxFileInput = Utilities.WriteTestResX(false, null, null, _env.CreateFile(folder, ".resx").
Path
);
328
t.StateFile = new TaskItem(_env.GetTempFile(".cache").
Path
);
371
string resxFileInput = Utilities.WriteTestResX(false, null, null, _env.CreateFile(folder, ".resx").
Path
);
374
t.StateFile = new TaskItem(_env.GetTempFile(".cache").
Path
);
455
string resxFileInput = Utilities.WriteTestResX(false, null, null, _env.CreateFile(folder, ".resx").
Path
);
456
TaskItem stateFile = new TaskItem(_env.GetTempFile(".cache").
Path
);
677
var firstResx = Utilities.WriteTestResX(false, null, null, _env.CreateFile(folder, ".resx").
Path
);
678
var secondResx = Utilities.WriteTestResX(false, null, null, _env.CreateFile(folder, ".resx").
Path
);
679
var cache = _env.GetTempFile(folder, ".cache").
Path
;
2031
gr.Sources = new ITaskItem[] { new TaskItem(resource.
Path
) };
2079
t.StateFile = new TaskItem(env.GetTempFile(".cache").
Path
);
2082
var resourcesFile = env.CreateFile(inputExtension).
Path
;
2085
t.OutputResources = new ITaskItem[] { new TaskItem(env.GetTempFile(".resources").
Path
) };
3678
string resxFile = env.CreateFile("test.resx").
Path
;
3922
File.SetLastWriteTime(dll.
Path
, DateTime.Now - TimeSpan.FromDays(30));
3924
var referenceItem = new TaskItem(dll.
Path
);
4124
resgenFile = env.CreateFile(".resx", contents).
Path
;
ResourceHandling\MSBuildResXReader_Tests.cs (3)
167
File.WriteAllText(linkedTextFile.
Path
,
298
File.WriteAllText(linkedTextFile.
Path
,
304
<value>{linkedTextFile.
Path
};{typeNameInResx}</value>
RoslynCodeTaskFactory_Tests.cs (9)
79
string output = RunnerUtilities.ExecMSBuild(inlineTask.
Path
, out bool success);
116
string output = RunnerUtilities.ExecMSBuild(assemblyProj.
Path
+ $" /p:OutDir={Path.Combine(folder.Path, "subFolder")} /restore", out bool success);
141
output = RunnerUtilities.ExecMSBuild(inlineTask.
Path
, out success);
297
TryLoadTaskBodyAndExpectSuccess($"<Code Source=\"{file.
Path
}\"/>", expectedCodeType: RoslynCodeTaskFactoryCodeType.Class);
301
TryLoadTaskBodyAndExpectSuccess($"<Code Source=\"{file.
Path
}\" Type=\"{codeType}\">code</Code>", expectedCodeType: codeType);
394
$"<Code Source=\"{file.
Path
}\" />",
411
$"<Code Source=\"{file.
Path
}\" Type=\"Fragment\"/>",
427
$"<Code Source=\"{file.
Path
}\" Type=\"Method\"/>",
603
$"<Code Source=\"{file.
Path
}\"/>",
Unzip_Tests.cs (6)
33
new FileInfo(file1.
Path
).IsReadOnly = true;
186
new FileInfo(file1.
Path
).IsReadOnly = true;
218
SourceFiles = new ITaskItem[] { new TaskItem(file.
Path
), }
464
string output = RunnerUtilities.RunProcessAndGetOutput($"/bin/sh", $"-c \"{command} {sourceFile.
Path
}\"", out bool success);
467
ExecuteCommand("chmod +x", sourceFile.
Path
);
468
var permissions = ExecuteCommand("ls -l", sourceFile.
Path
).Substring(0, 10);
WriteCodeFragment_Tests.cs (2)
154
string fileName = Path.GetFileName(file.
Path
);
161
Assert.True(File.Exists(file.
Path
));
WriteLinesToFile_Tests.cs (10)
164
string file = testEnv.ExpectFile().
Path
;
330
File.Exists(file.
Path
).ShouldBeTrue();
331
File.ReadAllText(file.
Path
).ShouldNotBeEmpty();
337
File = new TaskItem(file.
Path
),
341
File.Exists(file.
Path
).ShouldBeTrue();
342
File.ReadAllText(file.
Path
).ShouldBeEmpty();
357
File.Exists(file.
Path
).ShouldBeFalse();
363
File = new TaskItem(file.
Path
),
367
File.Exists(file.
Path
).ShouldBeTrue();
368
File.ReadAllText(file.
Path
).ShouldBeEmpty();
ZipDirectory_Tests.cs (4)
78
DestinationFile = new TaskItem(file.
Path
),
86
_mockEngine.Log.ShouldContain(file.
Path
, customMessage: _mockEngine.Log);
88
using (FileStream stream = new FileStream(file.
Path
, FileMode.Open, FileAccess.Read, FileShare.Read))
117
DestinationFile = new TaskItem(file.
Path
),
Microsoft.Build.UnitTests.Shared (7)
ObjectModelHelpers.cs (2)
1772
nodes[parent] = (IsRoot(parent), file.
Path
);
1794
nodes[reference] = (false, file.
Path
);
TestEnvironment.cs (5)
700
File.WriteAllText(
Path
, contents ?? string.Empty);
711
Assert.True(FileSystems.Default.FileExists(
Path
), $"A file expected as an output does not exist: {
Path
}");
716
FileUtilities.DeleteNoThrow(
Path
);
722
File.Delete(
Path
);
Microsoft.Build.Utilities.UnitTests (4)
ToolTask_Tests.cs (4)
856
OutputPath = output.
Path
,
861
File.Exists(output.
Path
).ShouldBeTrue();
865
File.ReadAllText(output.
Path
).ShouldContain("łoł");
869
File.ReadAllText(output.
Path
).ShouldContain("lol");