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