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