75 references to ProjectContextId
Microsoft.Build (34)
BackEnd\Components\Logging\LoggingService.cs (9)
1011if (warning.ProjectFile == null && buildEventContext.ProjectContextId != BuildEventContext.InvalidProjectContextId) 1253if ((warningEvent = buildEvent as BuildWarningEventArgs) != null && warningEvent.BuildEventContext != null && warningEvent.BuildEventContext.ProjectContextId != BuildEventContext.InvalidProjectContextId) 1257else if ((errorEvent = buildEvent as BuildErrorEventArgs) != null && errorEvent.BuildEventContext != null && errorEvent.BuildEventContext.ProjectContextId != BuildEventContext.InvalidProjectContextId) 1261else if ((messageEvent = buildEvent as BuildMessageEventArgs) != null && messageEvent.BuildEventContext != null && messageEvent.BuildEventContext.ProjectContextId != BuildEventContext.InvalidProjectContextId) 1359if (!_projectFileMap.ContainsKey(projectStartedEventArgs.BuildEventContext.ProjectContextId)) 1361_projectFileMap[projectStartedEventArgs.BuildEventContext.ProjectContextId] = projectStartedEventArgs.ProjectFile; 1372return new WarningsConfigKey(buildEventContext.ProjectInstanceId, buildEventContext.ProjectContextId); 1932_projectFileMap.TryGetValue(context.ProjectContextId, out string projectFile); 1937ErrorUtilities.ThrowInternalError("ContextID {0} should have been in the ID-to-project file mapping but wasn't!", context.ProjectContextId);
BackEnd\Components\Logging\LoggingServiceLogMethods.cs (13)
135if (buildEvent.ProjectFile == null && buildEventContext.ProjectContextId != BuildEventContext.InvalidProjectContextId) 137_projectFileMap.TryGetValue(buildEventContext.ProjectContextId, out string projectFile); 138ErrorUtilities.VerifyThrow(projectFile != null, "ContextID {0} should have been in the ID-to-project file mapping but wasn't!", buildEventContext.ProjectContextId); 175if (buildEvent.ProjectFile == null && buildEventContext.ProjectContextId != BuildEventContext.InvalidProjectContextId) 177_projectFileMap.TryGetValue(buildEventContext.ProjectContextId, out string projectFile); 178ErrorUtilities.VerifyThrow(projectFile != null, "ContextID {0} should have been in the ID-to-project file mapping but wasn't!", buildEventContext.ProjectContextId); 327if (buildEvent.ProjectFile == null && buildEventContext.ProjectContextId != BuildEventContext.InvalidProjectContextId) 329_projectFileMap.TryGetValue(buildEventContext.ProjectContextId, out string projectFile); 330ErrorUtilities.VerifyThrow(projectFile != null, "ContextID {0} should have been in the ID-to-project file mapping but wasn't!", buildEventContext.ProjectContextId); 619if (!_projectFileMap.TryRemove(projectBuildEventContext.ProjectContextId, out _)) 621ErrorUtilities.ThrowInternalError("ContextID {0} for project {1} should be in the ID-to-file mapping!", projectBuildEventContext.ProjectContextId, projectFile); 643projectBuildEventContext.ProjectContextId, 740targetBuildEventContext.ProjectContextId,
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
475return (cacheResult, buildEventContext.ProjectContextId);
BuildCheck\Infrastructure\BuildEventsProcessor.cs (1)
35: this(context.ProjectContextId, context.TargetId, context.TaskId)
Logging\BinaryLogger\BuildEventArgsWriter.cs (1)
1073Write(buildEventContext.ProjectContextId);
Logging\ParallelLogger\ParallelConsoleLogger.cs (3)
562var projectKey = (e.BuildEventContext.NodeId, e.BuildEventContext.ProjectContextId); 1016var key = (e.BuildEventContext.NodeId, e.BuildEventContext.ProjectContextId); 1156&& e.BuildEventContext.ProjectContextId != BuildEventContext.InvalidProjectContextId
Logging\ParallelLogger\ParallelLoggerHelpers.cs (6)
232&& (contextX.ProjectContextId == contextY.ProjectContextId); 238return context.ProjectContextId + (context.NodeId << 24); 261&& (contextX.ProjectContextId == contextY.ProjectContextId) 268return context.ProjectContextId + (context.NodeId << 24);
Microsoft.Build.Engine.UnitTests (10)
BackEnd\LoggingServicesLogMethod_Tests.cs (7)
847VerifyProjectStartedEventArgs(service, context.ProjectContextId, message, projectFile, targetNames, parentBuildEventContext, context); 873projectCacheBuildEventContext.ProjectContextId.ShouldNotBe(BuildEventContext.InvalidProjectContextId); 886projectContextId: projectCacheBuildEventContext.ProjectContextId); 887projectStartedBuildEventContext.ProjectContextId.ShouldBe(projectCacheBuildEventContext.ProjectContextId); 963projectStartedBuildEventContext.ProjectContextId.ShouldBe(ProjectContextId); 1411Assert.Contains("ContextID " + s_buildEventContext.ProjectContextId, ex.Message);
BuildEventArgsSerialization_Tests.cs (1)
1193return $"{context.BuildRequestId} {context.NodeId} {context.ProjectContextId} {context.ProjectInstanceId} {context.SubmissionId} {context.TargetId} {context.TaskId}";
Graph\IsolateProjects_Tests.cs (1)
217logger.Errors.First().BuildEventContext.ProjectContextId.ShouldNotBe(BuildEventContext.InvalidProjectContextId);
Graph\ResultCacheBasedBuilds_Tests.cs (1)
402results["1"].Logger.Errors.First().BuildEventContext.ProjectContextId.ShouldNotBe(BuildEventContext.InvalidProjectContextId);
Microsoft.Build.Framework (6)
BinaryTranslator.cs (1)
1161_writer.Write(value.ProjectContextId);
BinaryWriterExtensions.cs (1)
91writer.Write(context.ProjectContextId);
BuildEventContext.cs (3)
126return WithInstanceIdAndContextId(other.ProjectInstanceId, other.ProjectContextId); 303&& _projectContextId == buildEventContext.ProjectContextId 313return $"Node={NodeId} Submission={SubmissionId} ProjectContext={ProjectContextId} ProjectInstance={ProjectInstanceId} Eval={EvaluationId} Target={TargetId} Task={TaskId}";
ProjectStartedEventArgs.cs (1)
364writer.Write((Int32)parentProjectBuildEventContext.ProjectContextId);
Microsoft.Build.Framework.UnitTests (2)
EventArgs_Tests.cs (2)
113startedEvent.ParentProjectBuildEventContext.ProjectContextId.ShouldBe(0); 121startedEvent.BuildEventContext.ProjectContextId.ShouldBe(4);
Microsoft.DotNet.ArcadeLogging (3)
PipelinesLogger.cs (3)
414x.ProjectContextId == y.ProjectContextId; 417public int GetHashCode(BuildEventContext x) => x.ProjectContextId + (x.NodeId << 24);
MSBuild (1)
TerminalLogger\TerminalLogger.cs (1)
56: this(context.ProjectContextId)
TaskUsageLogger (3)
TaskUsageLogger.cs (3)
117GatherAndEvaluateTasksForProject(p, e.BuildEventContext.ProjectContextId); 122_toolsVersionsByProjectContextId[e.BuildEventContext.ProjectContextId] = p.ToolsVersion; 172GetAssemblySpecificationFor(e.TaskName, e.BuildEventContext.ProjectContextId, e.ProjectFile),
XmlFileLogger (16)
ObjectModel\Build.cs (16)
77var project = GetOrAddProject(targetStartedEventArgs.BuildEventContext.ProjectContextId); 88var project = GetOrAddProject(buildMessageEventArgs.BuildEventContext.ProjectContextId); 101var project = GetOrAddProject(taskCommandLineEventArgs.BuildEventContext.ProjectContextId); 117var project = GetOrAddProject(buildMessageEventArgs.BuildEventContext.ProjectContextId); 134var project = GetOrAddProject(buildMessageEventArgs.BuildEventContext.ProjectContextId); 150node = GetOrAddProject(buildMessageEventArgs.BuildEventContext.ProjectContextId) 156node = GetOrAddProject(buildMessageEventArgs.BuildEventContext.ProjectContextId) 159else if (buildMessageEventArgs.BuildEventContext.ProjectContextId > 0) 161node = GetOrAddProject(buildMessageEventArgs.BuildEventContext.ProjectContextId); 173var project = GetOrAddProject(taskStartedEventArgs.BuildEventContext.ProjectContextId); 187if (projectStartedEventArgs.ParentProjectBuildEventContext?.ProjectContextId >= 0) 189parent = GetOrAddProject(projectStartedEventArgs.ParentProjectBuildEventContext.ProjectContextId); 192var project = GetOrAddProject(projectStartedEventArgs.BuildEventContext.ProjectContextId, projectStartedEventArgs, parent); 234var project = GetOrAddProject(targetFinishedEventArgs.BuildEventContext.ProjectContextId); 246var project = GetOrAddProject(projectFinishedEventArgs.BuildEventContext.ProjectContextId); 256var project = GetOrAddProject(taskFinishedEventArgs.BuildEventContext.ProjectContextId);