13 writes to Project
Microsoft.Build (4)
BackEnd\BuildManager\BuildManager.cs (3)
1489config.Project = instances[0]; 1529existingConfiguration.Project = newInstance; 2237existingConfiguration.Project = newConfiguration.Project;
BackEnd\Shared\BuildRequestConfiguration.cs (1)
504Project = loadProjectFromFile.Invoke();
Microsoft.Build.Engine.UnitTests (9)
BackEnd\BuildRequestConfiguration_Tests.cs (1)
189config1.Project = projectInstance;
BackEnd\BuildRequestEngine_Tests.cs (1)
101_entry.RequestConfiguration.Project = CreateStandinProject();
BackEnd\IntrinsicTask_Tests.cs (2)
3959entry.RequestConfiguration.Project = projectInstance; 3994entry.RequestConfiguration.Project = projectInstance;
BackEnd\TargetBuilder_Tests.cs (1)
1680config.Project = project.CreateProjectInstance();
BackEnd\TargetEntry_Tests.cs (2)
1027config.Project = project; 1045config.Project = project;
BackEnd\TaskBuilder_Tests.cs (1)
1245config.Project = project.CreateProjectInstance();
BackEnd\TaskHost_Tests.cs (1)
78configuration.Project = new ProjectInstance(ProjectRootElement.Create());
67 references to Project
Microsoft.Build (57)
BackEnd\BuildManager\BuildManager.cs (11)
858ErrorUtilities.VerifyThrow(configuration.Project != null, "Configuration should have been loaded."); 859return configuration.Project!; 2209else if (unresolvedConfiguration.Project != null && replaceProjectInstance) 2213else if (unresolvedConfiguration.Project != null && resolvedConfiguration.Project != null && !ReferenceEquals(unresolvedConfiguration.Project, resolvedConfiguration.Project)) 2218else if (unresolvedConfiguration.Project != null && resolvedConfiguration.Project == null) 2237existingConfiguration.Project = newConfiguration.Project; 2438: new BuildEventContext(result.SubmissionId, node, configuration.Project?.EvaluationId ?? BuildEventContext.InvalidEvaluationId, configuration.ConfigurationId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidTaskId);
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (1)
352resultToReport.ProjectStateAfterBuild = config.Project;
BackEnd\Components\Logging\NodeLoggingContext.cs (2)
85int evaluationId = (configuration != null && !configuration.IsCached && configuration.Project != null) ? configuration.Project.EvaluationId : BuildEventContext.InvalidEvaluationId;
BackEnd\Components\Logging\ProjectLoggingContext.cs (6)
41requestEntry.RequestConfiguration.Project.PropertiesToBuildWith, 42requestEntry.RequestConfiguration.Project.ItemsToBuildWith, 44requestEntry.RequestConfiguration.Project.EvaluationId, 88requestEntry.RequestConfiguration.Project.PropertiesToBuildWith, 89requestEntry.RequestConfiguration.Project.ItemsToBuildWith, 91requestEntry.RequestConfiguration.Project.EvaluationId,
BackEnd\Components\ProjectCache\ProjectCacheService.cs (8)
421return GetProjectCacheDescriptors(buildRequestConfiguration.Project).Any(); 456cacheRequest.Configuration.Project, 460evaluationId: cacheRequest.Configuration.Project.EvaluationId, 462projectFile: cacheRequest.Configuration.Project.FullPath); 495configuration.Project.TranslateEntireState = true; 711ErrorUtilities.VerifyThrowInternalNull(requestConfiguration.Project, nameof(requestConfiguration.Project)); 725List<ProjectCacheDescriptor> projectCacheDescriptors = GetProjectCacheDescriptors(requestConfiguration.Project).ToList();
BackEnd\Components\RequestBuilder\RequestBuilder.cs (6)
1168if (_requestEntry.RequestConfiguration.Project.UsingDifferentToolsVersionFromProjectFile) 1172_requestEntry.RequestConfiguration.Project.OriginalProjectToolsVersion, 1173_requestEntry.RequestConfiguration.Project.ToolsVersion); 1183_requestEntry.RequestConfiguration.Project.ProjectFileLocation, "NoTargetSpecified"); 1386ProjectInstance project = _requestEntry?.RequestConfiguration?.Project; 1426ProjectInstance project = _requestEntry?.RequestConfiguration?.Project;
BackEnd\Components\RequestBuilder\TargetBuilder.cs (5)
130_projectInstance = configuration.Project; 417_requestEntry.RequestConfiguration.Project.Targets.ContainsKey(currentTargetEntry.Name), 431IList<TargetSpecification> afterTargets = _requestEntry.RequestConfiguration.Project.GetTargetsWhichRunAfter(currentTargetEntry.Name); 452IList<TargetSpecification> beforeTargets = _requestEntry.RequestConfiguration.Project.GetTargetsWhichRunBefore(currentTargetEntry.Name); 797IList<TargetSpecification> targetsWhichRunAfter = _requestEntry.RequestConfiguration.Project.GetTargetsWhichRunAfter(targetToCheck);
BackEnd\Components\RequestBuilder\TargetEntry.cs (3)
481TargetUpToDateChecker dependencyAnalyzer = new TargetUpToDateChecker(requestEntry.RequestConfiguration.Project, _target, targetLoggingContext.LoggingService, targetLoggingContext.BuildEventContext); 936_requestEntry.RequestConfiguration.Project.Targets.TryGetValue(_targetSpecification.TargetName, out _target); 940_targetSpecification.ReferenceLocation ?? _requestEntry.RequestConfiguration.Project.ProjectFileLocation,
BackEnd\Components\RequestBuilder\TaskBuilder.cs (9)
167_taskHostObject = requestEntry.Request.HostServices.GetHostObject(requestEntry.RequestConfiguration.Project.FullPath, loggingContext.Target.Name, _taskNode.Name); 170_projectFullPath = requestEntry.RequestConfiguration.Project.FullPath; 308_taskExecutionHost.InitializeForTask(taskHost, _targetLoggingContext, _buildRequestEntry.RequestConfiguration.Project, _taskNode.Name, _taskNode.Location, _taskHostObject, _continueOnError != ContinueOnError.ErrorAndStop, 639_buildRequestEntry.RequestConfiguration.Project, 802using (FullTracking.Track(taskLoggingContext.TargetLoggingContext.Target.Name, _taskNode.Name, _buildRequestEntry.ProjectRootDirectory, _buildRequestEntry.RequestConfiguration.Project.PropertiesToBuildWith)) 832bucket.Lookup.SetProperty(ProjectPropertyInstance.Create(ReservedPropertyNames.lastTaskResult, taskResult ? "true" : "false", true/* may be reserved */, _buildRequestEntry.RequestConfiguration.Project.IsImmutable)); 1028var projectReferenceItems = _buildRequestEntry.RequestConfiguration.Project.GetItems(ItemTypeNames.ProjectReference); 1191ProjectItemInstanceFactory itemFactory = new ProjectItemInstanceFactory(_buildRequestEntry.RequestConfiguration.Project, itemName); 1209lookup.SetProperty(ProjectPropertyInstance.Create(propertyName, taskParameterValue, taskPropertyInstance.TaskParameterLocation, _buildRequestEntry.RequestConfiguration.Project.IsImmutable));
BackEnd\Components\RequestBuilder\TaskHost.cs (1)
1183propertyDictionaries[i] = new PropertyDictionary<ProjectPropertyInstance>(_requestEntry.RequestConfiguration.Project.GlobalPropertiesDictionary);
BackEnd\Shared\BuildRequestConfiguration.cs (5)
594_baseLookup = new Lookup(Project.ItemsToBuildWith, Project.PropertiesToBuildWith); 811ErrorUtilities.VerifyThrowInternalNull(Project); 831var items = Project.GetItems(ItemTypeNames.GraphIsolationExemptReference); 841.Select(s => MSBuildGlob.Parse(Project.Directory, s)));
Microsoft.Build.Engine.UnitTests (10)
BackEnd\BuildRequestConfiguration_Tests.cs (6)
184Assert.Null(config1.Project); 190Assert.Same(config1.Project, projectInstance); 300deserializedConfig.Project.ShouldNotBeNull(); 303deserializedConfig.Project.Directory.ShouldNotBeEmpty(); 304deserializedConfig.Project.Directory.ShouldBe(configuration.Project.Directory);
BackEnd\MockTaskBuilder.cs (2)
102lookupForInference.AddNewItem(new ProjectItemInstance(requestEntry.RequestConfiguration.Project, taskInstance.Name + "_Item", "Item", task.Location.File)); 106lookupForExecution.AddNewItem(new ProjectItemInstance(requestEntry.RequestConfiguration.Project, taskInstance.Name + "_Item", "Item", task.Location.File));
BackEnd\TargetBuilder_Tests.cs (1)
1683return config.Project;
BackEnd\TaskBuilder_Tests.cs (1)
1248return config.Project;