1 write to ProjectFile
Microsoft.Build.UnitTests.Shared (1)
EngineTestEnvironment.cs (1)
130
ProjectFile
= Path.GetFullPath(Path.Combine(projectDir, projectFileName));
77 references to ProjectFile
Microsoft.Build.BuildCheck.UnitTests (2)
TaskInvocationAnalysisDataTests.cs (2)
89
var request = new BuildRequestData(testProject.
ProjectFile
, new Dictionary<string, string?>(), MSBuildConstants.CurrentToolsVersion, [], null, BuildRequestDataFlags.None);
105
data.ProjectFilePath.ShouldBe(testProject.
ProjectFile
);
Microsoft.Build.CommandLine.UnitTests (6)
CommandLineSwitches_Tests.cs (1)
1525
string project = testEnvironment.CreateTestProjectWithFiles("project.proj", projectContent).
ProjectFile
;
XMake_Tests.cs (5)
2570
RunnerUtilities.ExecMSBuild($"\"{testProject.
ProjectFile
}\" {switches} ", out bool success, _output);
2657
string output = RunnerUtilities.ExecMSBuild($"{arguments} \"{testProject.
ProjectFile
}\"", out bool success, _output);
2715
RunnerUtilities.ExecMSBuild($"{arguments} \"{testProject.
ProjectFile
}\"", out bool success, _output);
2721
RunnerUtilities.ExecMSBuild($"{arguments} \"{testProject.
ProjectFile
}\"", out success, _output);
2836
string output = RunnerUtilities.ExecMSBuild($"\"{testProject.
ProjectFile
}\" {string.Join(" ", arguments)}", out var success, _output);
Microsoft.Build.Engine.OM.UnitTests (18)
Construction\ConstructionEditing_Tests.cs (2)
3230
File.WriteAllText(testProject.
ProjectFile
, content);
3232
var p = new Project(testProject.
ProjectFile
);
Definition\DefinitionEditing_Tests.cs (1)
1700
var projectFile = testProject.
ProjectFile
;
Definition\Project_Tests.cs (7)
3254
var project = new Project(testFiles.
ProjectFile
, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection);
3284
var project = new Project(testFiles.
ProjectFile
, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection);
3294
var absoluteFile = Path.Combine(Path.GetDirectoryName(testFiles.
ProjectFile
), "1.foo");
3575
var project = new Project(testFiles.
ProjectFile
, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection);
3770
var project = new Project(testFiles.
ProjectFile
, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection);
3772
var absoluteFile = Path.Combine(Path.GetDirectoryName(testFiles.
ProjectFile
), "a.cs");
3845
var globResult = new Project(testFiles.
ProjectFile
, null, MSBuildConstants.CurrentToolsVersion, projectCollection).GetAllGlobs();
Definition\ProjectItem_Tests.cs (8)
940
CreateProjectInstanceFromFileWithDriveEnumeratingWildcard(env, testProject.
ProjectFile
, throwException);
1102
.
ProjectFile
;
1155
ObjectModelHelpers.AssertItems(expectedInclude, new Project(testFiles.
ProjectFile
, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection).Items.ToList());
1175
ObjectModelHelpers.AssertItems(expectedInclude, new Project(testFiles.
ProjectFile
, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection).Items.ToList());
2216
var project = new Project(testProject.
ProjectFile
, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, env.CreateProjectCollection().Collection);
2276
var project = new Project(testProject.
ProjectFile
, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, env.CreateProjectCollection().Collection);
3710
itemsFromFragmentWithGlobs = Helpers.MakeList(new Project(testProject.
ProjectFile
).GetItems("i"));
3756
var project = new Project(testFiles.
ProjectFile
, new Dictionary<string, string>(), null, projectCollection);
Microsoft.Build.Engine.UnitTests (43)
BackEnd\BuildManager_Tests.cs (2)
4102
var request1 = new BuildRequestData(testFiles.
ProjectFile
, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, new[] { "Build" }, null);
4103
var request2 = new BuildRequestData(testFiles.
ProjectFile
, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, new[] { "Build" }, null);
BackEnd\TargetBuilder_Tests.cs (1)
273
var result = buildSession.BuildProjectFile(files.
ProjectFile
);
BackEnd\TaskHostFactory_Tests.cs (1)
173
ProjectInstance projectInstance = new(project.
ProjectFile
);
BackEnd\TaskRegistry_Tests.cs (1)
670
testProject.
ProjectFile
,
BinaryLogger_Tests.cs (3)
592
<MSBuild Projects='{referenceProject.
ProjectFile
}' Targets='Target2' />
593
<MSBuild Projects='{referenceProject.
ProjectFile
}' Targets='Target2' /><!-- yes, again. That way it's a cached result -->
598
new BuildRequestData(entryProject.
ProjectFile
, new Dictionary<string, string>(), null, new string[] { "BuildSelf" }, null))
ConsoleLogger_Tests.cs (9)
217
var p = pc.Collection.LoadProject(project.
ProjectFile
);
224
sc.ToString().ShouldContain("source_of_warning : warning : Hello from project 1 [" + project.
ProjectFile
+ "::Number=1]");
225
sc.ToString().ShouldContain("source_of_warning : warning : Hello from project 2 [" + project.
ProjectFile
+ "::Number=2]");
258
var p = pc.Collection.LoadProject(project.
ProjectFile
);
265
sc.ToString().ShouldContain("source_of_error : error : Hello from project 1 [" + project.
ProjectFile
+ "::Number=1]");
266
sc.ToString().ShouldContain("source_of_error : error : Hello from project 2 [" + project.
ProjectFile
+ "::Number=2]");
310
var p = pc.Collection.LoadProject(project.
ProjectFile
);
318
output.ShouldContain("source_of_error : error : Hello from project 1 [" + project.
ProjectFile
+ "::Number=1 TargetFramework=netcoreapp2.1]");
319
output.ShouldContain("source_of_error : error : Hello from project 2 [" + project.
ProjectFile
+ "::Number=2 TargetFramework=netcoreapp2.1]");
Construction\ProjectRootElement_Tests.cs (2)
76
ProjectRootElement xml = ProjectRootElement.Open(testFiles.
ProjectFile
);
108
ProjectRootElement xml = ProjectRootElement.Open(testFiles.
ProjectFile
);
Evaluation\Evaluator_Tests.cs (17)
957
Project project = new Project(content.
ProjectFile
, null, null);
4629
<Import Project=""{project1.
ProjectFile
}"" />
4630
<Import Project=""{project2.
ProjectFile
}"" />
4634
File.SetLastWriteTime(project1.
ProjectFile
, DateTime.Now.AddHours(-1));
4635
File.SetLastWriteTime(project2.
ProjectFile
, DateTime.Now);
4636
File.SetLastWriteTime(primaryProject.
ProjectFile
, DateTime.Now.AddHours(-1));
4638
Project project = new Project(primaryProject.
ProjectFile
, null, null);
4642
propertyValue.ShouldStartWith(project2.
ProjectFile
);
4644
propertyValue.ShouldNotContain(primaryProject.
ProjectFile
, Case.Insensitive);
4645
propertyValue.ShouldNotContain(project1.
ProjectFile
, Case.Insensitive);
4658
<Import Project=""{project1.
ProjectFile
}"" />
4659
<Import Project=""{project2.
ProjectFile
}"" />
4663
File.SetLastWriteTime(project1.
ProjectFile
, DateTime.Now.AddHours(-1));
4664
File.SetLastWriteTime(project2.
ProjectFile
, DateTime.Now.AddHours(-1));
4665
File.SetLastWriteTime(primaryProject.
ProjectFile
, DateTime.Now);
4668
Project project = new Project(primaryProject.
ProjectFile
, null, null);
4670
project.GetPropertyValue(Constants.MSBuildAllProjectsPropertyName).ShouldStartWith(primaryProject.
ProjectFile
);
Evaluation\ImportFromMSBuildExtensionsPath_Tests.cs (1)
866
string mainProjectPath = testEnvironment.CreateTestProjectWithFiles("main.proj", mainTargetsFileContent).
ProjectFile
;
Evaluation\ItemEvaluation_Tests.cs (2)
598
var project = new Project(projectFiles.
ProjectFile
);
659
Project project = Should.NotThrow(() => new Project(projectFiles.
ProjectFile
));
Evaluation\Preprocessor_Tests.cs (1)
1098
string importPath = Path.GetFullPath(import.
ProjectFile
);
Graph\ProjectGraph_Tests.cs (1)
1882
var projectFile = _env.CreateTestProjectWithFiles($@"<Project>{MultitargetingSpecificationPropertyGroup}</Project>").
ProjectFile
;
WarningsAsMessagesAndErrors_Tests.cs (2)
62
<MSBuild Projects=""{project2.
ProjectFile
}"" Targets=""Build"" />
156
<MSBuild Projects=""{project2.
ProjectFile
}"" Targets=""Build"" />
Microsoft.Build.Tasks.UnitTests (3)
Exec_Tests.cs (2)
960
var project = collection.LoadProject(testProject.
ProjectFile
).CreateProjectInstance();
1017
var project = collection.LoadProject(testProject.
ProjectFile
).CreateProjectInstance();
RoslynCodeTaskFactory_Tests.cs (1)
204
text1 = text1.Replace("p2.proj", p2.
ProjectFile
);
Microsoft.Build.UnitTests.Shared (5)
EngineTestEnvironment.cs (2)
131
File.WriteAllText(
ProjectFile
, ObjectModelHelpers.CleanupFileContents(projectContents));
219
Project project = new Project(
ProjectFile
, globalProperties, toolsVersion, projectCollection);
ObjectModelHelpers.cs (3)
145
var evaluatedItems = itemEvaluator(testProject.
ProjectFile
, collection);
1406
return BuildProjectFileUsingBuildManager(testProject.
ProjectFile
, logger, parameters);
1467
BuildTargetWithDriveEnumeratingWildcardUsingBuildManager(env, testProject.
ProjectFile
, targetName, expectedBuildResult, testOutput);