326 writes to BuildEventContext
Microsoft.Build (72)
BackEnd\BuildManager\BuildManager.cs (1)
1655
submissionStartedEvent.
BuildEventContext
= buildEventContext;
BackEnd\Components\Communications\LogMessagePacket.cs (2)
296
args.
BuildEventContext
= buildEventContext;
310
args.
BuildEventContext
= buildEventContext;
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
349
BuildEventContext
= new BuildEventContext(nodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId)
BackEnd\Components\Logging\LoggingContext.cs (1)
157
BuildEventContext
= _eventContext
BackEnd\Components\Logging\LoggingService.cs (4)
1623
BuildEventContext
= warningEvent.BuildEventContext,
1645
BuildEventContext
= warningEvent.BuildEventContext,
1668
BuildEventContext
= warningEvent.BuildEventContext,
1689
BuildEventContext
= warningEvent.BuildEventContext,
BackEnd\Components\Logging\LoggingServiceLogMethods.cs (13)
174
buildEvent.
BuildEventContext
= buildEventContext;
326
buildEvent.
BuildEventContext
= buildEventContext;
433
BuildEventContext
= projectEvaluationEventContext,
463
BuildEventContext
= projectEvaluationEventContext,
592
buildEvent.
BuildEventContext
= projectBuildEventContext;
613
buildEvent.
BuildEventContext
= projectBuildEventContext;
659
buildEvent.
BuildEventContext
= targetBuildEventContext;
691
buildEvent.
BuildEventContext
= targetBuildEventContext;
717
buildEvent.
BuildEventContext
= taskBuildEventContext;
754
buildEvent.
BuildEventContext
= taskBuildEventContext;
785
buildEvent.
BuildEventContext
= taskBuildEventContext;
806
BuildEventContext
= buildEventContext,
827
responseFileUsedEvent.
BuildEventContext
= buildEventContext;
BackEnd\Components\Logging\NodeLoggingContext.cs (1)
112
BuildEventContext
= projectLoggingContext.BuildEventContext,
BackEnd\Components\RequestBuilder\AssemblyLoadsTracker.cs (1)
146
buildArgs.
BuildEventContext
= _loggingContext.BuildEventContext;
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupLoggingHelper.cs (1)
306
args.
BuildEventContext
= buildEventContext;
BackEnd\Components\RequestBuilder\TargetBuilder.cs (1)
575
BuildEventContext
= _projectLoggingContext.BuildEventContext,
BackEnd\Components\RequestBuilder\TargetEntry.cs (1)
385
BuildEventContext
= projectLoggingContext.BuildEventContext,
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (1)
240
BuildEventContext
= _buildEventContext,
BackEnd\Components\RequestBuilder\TaskHost.cs (5)
458
warningEvent.
BuildEventContext
= _taskLoggingContext.BuildEventContext;
466
e.
BuildEventContext
= _taskLoggingContext.BuildEventContext;
510
e.
BuildEventContext
= _taskLoggingContext.BuildEventContext;
551
e.
BuildEventContext
= _taskLoggingContext.BuildEventContext;
592
e.
BuildEventContext
= _taskLoggingContext.BuildEventContext;
BackEnd\Shared\EventsCreatorHelper.cs (3)
24
buildEvent.
BuildEventContext
= buildEventContext;
55
buildEvent.
BuildEventContext
= buildEventContext;
86
buildEvent.
BuildEventContext
= buildEventContext;
BuildCheck\Infrastructure\BuildCheckBuildEventHandler.cs (1)
167
{
BuildEventContext
= checkContext.BuildEventContext };
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (3)
121
eventArgs.
BuildEventContext
= checkContext.BuildEventContext!;
538
new(checkEventStats) {
BuildEventContext
= loggingContext.BuildEventContext };
652
deferredArgs.
BuildEventContext
= deferredArgs.BuildEventContext!.WithInstanceIdAndContextId(buildEventContext);
BuildCheck\Infrastructure\CheckWrapper.cs (1)
159
eventArgs.
BuildEventContext
= checkContext.BuildEventContext;
Construction\Solution\SolutionProjectGenerator.cs (1)
1105
BuildEventContext
= _projectBuildEventContext,
Definition\ProjectProperty.cs (2)
109
args.
BuildEventContext
= loggingContext.BuildEventContext;
128
args.
BuildEventContext
= loggingContext.BuildEventContext;
Evaluation\Evaluator.cs (7)
1723
BuildEventContext
= _evaluationLoggingContext.BuildEventContext,
1837
BuildEventContext
= _evaluationLoggingContext.BuildEventContext,
2041
BuildEventContext
= _evaluationLoggingContext.BuildEventContext,
2102
BuildEventContext
= _evaluationLoggingContext.BuildEventContext,
2243
BuildEventContext
= _evaluationLoggingContext.BuildEventContext,
2274
BuildEventContext
= _evaluationLoggingContext.BuildEventContext,
2329
BuildEventContext
= _evaluationLoggingContext.BuildEventContext,
Evaluation\PropertyTrackingEvaluatorDataWrapper.cs (6)
239
args.
BuildEventContext
= _evaluationLoggingContext.BuildEventContext;
257
BuildEventContext
= _evaluationLoggingContext.BuildEventContext,
315
{
BuildEventContext
= _evaluationLoggingContext.BuildEventContext, };
353
{
BuildEventContext
= _evaluationLoggingContext.BuildEventContext, };
475
{
BuildEventContext
= loggingContext.BuildEventContext };
495
{
BuildEventContext
= loggingContext.BuildEventContext, };
Instance\ProjectPropertyInstance.cs (2)
105
args.
BuildEventContext
= envProperty.loggingContext.BuildEventContext;
119
args.
BuildEventContext
= envProperty.loggingContext.BuildEventContext;
Instance\TaskFactoryEngineContext.cs (4)
212
e.
BuildEventContext
= _loggingContext.BuildEventContext;
233
e.
BuildEventContext
= _loggingContext.BuildEventContext;
254
e.
BuildEventContext
= _loggingContext.BuildEventContext;
275
e.
BuildEventContext
= _loggingContext.BuildEventContext;
Logging\BinaryLogger\BinaryLogger.cs (1)
480
args.
BuildEventContext
= BuildEventContext.Invalid;
Logging\BinaryLogger\BuildEventArgsReader.cs (6)
927
e.
BuildEventContext
= fields.BuildEventContext;
979
e.
BuildEventContext
= fields.BuildEventContext;
1033
e.
BuildEventContext
= fields.BuildEventContext;
1049
e.
BuildEventContext
= fields.BuildEventContext;
1126
e.
BuildEventContext
= fields.BuildEventContext;
1424
buildEventArgs.
BuildEventContext
= fields.BuildEventContext;
Logging\BinaryLogger\BuildEventArgsWriter.cs (1)
252
buildMessageEventArgs.
BuildEventContext
= e.BuildEventContext ?? BuildEventContext.Invalid;
TelemetryInfra\TelemetryCollectorProvider.cs (1)
76
{
BuildEventContext
= loggingContext.BuildEventContext };
Microsoft.Build.Engine.UnitTests (198)
BackEnd\EventSourceSink_Tests.cs (2)
759
BuildEventContext
= new BuildEventContext(1, 2, 3, 4, 5, 6)
787
BuildEventContext
= s_buildWarning.BuildEventContext
BackEnd\LoggingService_Tests.cs (3)
795
warningArgs.
BuildEventContext
= new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidProjectContextId, 5, 6);
992
buildEvent.
BuildEventContext
= projectStarted;
1176
BuildEventContext
= new BuildEventContext(0, 0, 0, 0),
BackEnd\LoggingServicesLogMethod_Tests.cs (10)
1292
BuildEventContext
= buildEventContext,
1581
targetEvent.
BuildEventContext
= s_targetBuildEventContext;
1604
buildEvent.
BuildEventContext
= s_targetBuildEventContext;
1627
taskEvent.
BuildEventContext
= s_buildEventContext;
1649
taskEvent.
BuildEventContext
= s_buildEventContext;
1669
projectEvent.
BuildEventContext
= projectContext;
1694
buildEvent.
BuildEventContext
= generatedContext;
1713
buildMessageEvent.
BuildEventContext
= s_buildEventContext;
1740
buildEvent.
BuildEventContext
= s_buildEventContext;
1767
buildEvent.
BuildEventContext
= s_buildEventContext;
BackEnd\NodePackets_Tests.cs (9)
138
result.
BuildEventContext
= CreateBuildEventContext();
160
result.
BuildEventContext
= CreateBuildEventContext();
230
BuildEventContext
= CreateBuildEventContext(),
265
new EnvironmentVariableReadEventArgs("env", "message", "file", 0, 0) {
BuildEventContext
= new BuildEventContext(1, 2, 3, 4, 5, 6) },
297
BuildEventContext
= new BuildEventContext(1, 2, 3, 4, 5, 6, 7)
303
BuildEventContext
= new BuildEventContext(1, 2, 3, 4, 5, 6, 7)
309
BuildEventContext
= new BuildEventContext(1, 2, 3, 4, 5, 6, 7)
315
BuildEventContext
= new BuildEventContext(1, 2, 3, 4, 5, 6, 7)
321
BuildEventContext
= new BuildEventContext(1, 2, 3, 4, 5, 6, 7)
BuildEventArgsDataEnumeration.cs (3)
26
BuildEventContext
= BuildEventContext.Invalid,
53
BuildEventContext
= BuildEventContext.Invalid,
91
BuildEventContext
= BuildEventContext.Invalid,
BuildEventArgsSerialization_Tests.cs (14)
93
args.
BuildEventContext
= new BuildEventContext(1, 2, 3, 4, 5, 6);
165
args.
BuildEventContext
= new BuildEventContext(1, 2, 3, 4, 5, 6);
266
args.
BuildEventContext
= new BuildEventContext(4, 5, 6, 7);
346
BuildEventContext
= withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null,
419
BuildEventContext
= withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null,
495
BuildEventContext
= withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null,
583
BuildEventContext
= withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null,
678
BuildEventContext
= withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null,
750
BuildEventContext
= BuildEventContext.Invalid,
767
BuildEventContext
= BuildEventContext.Invalid,
796
BuildEventContext
= BuildEventContext.Invalid,
841
BuildEventContext
= BuildEventContext.Invalid,
874
BuildEventContext
= BuildEventContext.Invalid,
897
BuildEventContext
= BuildEventContext.Invalid,
ConfigureableForwardingLogger_Tests.cs (4)
53
_error.
BuildEventContext
= context;
54
_warning.
BuildEventContext
= context;
55
_targetStarted.
BuildEventContext
= context;
56
_targetFinished.
BuildEventContext
= context;
ConsoleLogger_Tests.cs (129)
466
es.Consume(new ProjectStartedEventArgs(1, null, null, "p", null, null, null, parentBuildEventContext: new BuildEventContext(1, 1, 1, 1)) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
467
es.Consume(new TargetStartedEventArgs(null, null, "t", null, null) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
468
es.Consume(new TaskStartedEventArgs(null, null, null, null, "task") {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
469
es.Consume(new BuildMessageEventArgs(null, null, null, MessageImportance.High) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
470
es.Consume(new BuildWarningEventArgs(null, null, null, 0, 0, 0, 0, null, null, null) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
471
es.Consume(new BuildErrorEventArgs(null, null, null, 0, 0, 0, 0, null, null, null) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
472
es.Consume(new TaskFinishedEventArgs(null, null, null, null, "task", true) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
473
es.Consume(new TargetFinishedEventArgs(null, null, "t", null, null, true) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
474
es.Consume(new ProjectFinishedEventArgs(null, null, "p", true) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
475
es.Consume(new BuildFinishedEventArgs(null, null, true) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
476
es.Consume(new BuildFinishedEventArgs(null, null, true) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
477
es.Consume(new BuildFinishedEventArgs(null, null, true) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
478
es.Consume(new MyCustomBuildEventArgs2() {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
494
bse.
BuildEventContext
= buildEventContext;
496
pse.
BuildEventContext
= buildEventContext;
498
trse.
BuildEventContext
= buildEventContext;
500
tase.
BuildEventContext
= buildEventContext;
502
bmea.
BuildEventContext
= buildEventContext;
504
bwea.
BuildEventContext
= buildEventContext;
506
beea.
BuildEventContext
= buildEventContext;
508
trfea.
BuildEventContext
= buildEventContext;
510
tafea.
BuildEventContext
= buildEventContext;
512
pfea.
BuildEventContext
= buildEventContext;
514
bfea.
BuildEventContext
= buildEventContext;
516
mcea.
BuildEventContext
= buildEventContext;
608
BuildEventContext
= new BuildEventContext(1, 2, 3, 4)
664
buildEventArgs.
BuildEventContext
= new BuildEventContext(1, 2, 3, 4);
696
bse.
BuildEventContext
= buildEventContext;
700
pse.
BuildEventContext
= buildEventContext;
704
trse.
BuildEventContext
= buildEventContext;
708
tase.
BuildEventContext
= buildEventContext;
712
bmea.
BuildEventContext
= buildEventContext;
716
tafea.
BuildEventContext
= buildEventContext;
720
trfea.
BuildEventContext
= buildEventContext;
724
pfea.
BuildEventContext
= buildEventContext;
728
bfea.
BuildEventContext
= buildEventContext;
746
bse.
BuildEventContext
= buildEventContext;
750
pse.
BuildEventContext
= buildEventContext;
754
trse.
BuildEventContext
= buildEventContext;
758
tase.
BuildEventContext
= buildEventContext;
765
beea.
BuildEventContext
= buildEventContext;
769
tafea.
BuildEventContext
= buildEventContext;
773
trfea.
BuildEventContext
= buildEventContext;
777
pfea.
BuildEventContext
= buildEventContext;
781
bfea.
BuildEventContext
= buildEventContext;
807
bse.
BuildEventContext
= buildEventContext;
811
pse.
BuildEventContext
= buildEventContext;
815
trse.
BuildEventContext
= buildEventContext;
819
tase.
BuildEventContext
= buildEventContext;
827
beea.
BuildEventContext
= buildEventContext;
831
tafea.
BuildEventContext
= buildEventContext;
835
trfea.
BuildEventContext
= buildEventContext;
839
pfea.
BuildEventContext
= buildEventContext;
843
bfea.
BuildEventContext
= buildEventContext;
869
bse.
BuildEventContext
= buildEventContext;
873
pse.
BuildEventContext
= buildEventContext;
877
trse.
BuildEventContext
= buildEventContext;
881
tase.
BuildEventContext
= buildEventContext;
885
bmea.
BuildEventContext
= buildEventContext;
889
tafea.
BuildEventContext
= buildEventContext;
893
trfea.
BuildEventContext
= buildEventContext;
897
pfea.
BuildEventContext
= buildEventContext;
901
bfea.
BuildEventContext
= buildEventContext;
922
bse.
BuildEventContext
= buildEventContext;
926
pse.
BuildEventContext
= buildEventContext;
930
trse.
BuildEventContext
= buildEventContext;
934
tase.
BuildEventContext
= buildEventContext;
941
beea.
BuildEventContext
= buildEventContext;
945
tafea.
BuildEventContext
= buildEventContext;
949
trfea.
BuildEventContext
= buildEventContext;
953
pfea.
BuildEventContext
= buildEventContext;
957
bfea.
BuildEventContext
= buildEventContext;
982
bse.
BuildEventContext
= buildEventContext;
986
pse.
BuildEventContext
= buildEventContext;
990
trse.
BuildEventContext
= buildEventContext;
994
tase.
BuildEventContext
= buildEventContext;
1002
beea.
BuildEventContext
= buildEventContext;
1006
tafea.
BuildEventContext
= buildEventContext;
1010
trfea.
BuildEventContext
= buildEventContext;
1014
pfea.
BuildEventContext
= buildEventContext;
1018
bfea.
BuildEventContext
= buildEventContext;
1043
bse.
BuildEventContext
= buildEventContext;
1047
pse.
BuildEventContext
= buildEventContext;
1051
trse.
BuildEventContext
= buildEventContext;
1055
tase.
BuildEventContext
= buildEventContext;
1063
beea.
BuildEventContext
= buildEventContext;
1067
tafea.
BuildEventContext
= buildEventContext;
1071
trfea.
BuildEventContext
= buildEventContext;
1075
pfea.
BuildEventContext
= buildEventContext;
1079
bfea.
BuildEventContext
= buildEventContext;
1099
c.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1117
c.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1132
c.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1155
buildEvent.
BuildEventContext
= new BuildEventContext(1, 2, 3, 4);
1376
buildEvent.
BuildEventContext
= new BuildEventContext(1, 2, 3, 4);
1433
buildEvent.
BuildEventContext
= new BuildEventContext(1, 2, 3, 4);
1453
buildEvent.
BuildEventContext
= new BuildEventContext(1, 2, 3, 4);
1559
bwea.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1565
beea.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1646
bwea.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1652
beea.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1729
project1Started.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1732
targetStarted1.
BuildEventContext
= project1Started.BuildEventContext;
1737
taskStarted1.
BuildEventContext
= project1Started.BuildEventContext;
1742
messsage1.
BuildEventContext
= project1Started.BuildEventContext;
1746
taskFinished1.
BuildEventContext
= project1Started.BuildEventContext;
1751
targetFinished1.
BuildEventContext
= project1Started.BuildEventContext;
1757
project2Started.
BuildEventContext
= new BuildEventContext(2, 2, 2, 2);
1760
targetStarted2.
BuildEventContext
= project2Started.BuildEventContext;
1765
taskStarted2.
BuildEventContext
= project2Started.BuildEventContext;
1770
messsage2.
BuildEventContext
= project2Started.BuildEventContext;
1774
taskFinished2.
BuildEventContext
= project2Started.BuildEventContext;
1779
targetFinished2.
BuildEventContext
= project2Started.BuildEventContext;
1784
finished2.
BuildEventContext
= project2Started.BuildEventContext;
1789
finished1.
BuildEventContext
= project1Started.BuildEventContext;
1842
messsage1.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1856
messsage2.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1870
messsage2.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1874
project.
BuildEventContext
= messsage1.BuildEventContext;
1906
project.
BuildEventContext
= context;
1910
targetStarted1.
BuildEventContext
= context;
1914
messsage1.
BuildEventContext
= context;
1936
project.
BuildEventContext
= context;
1940
project2.
BuildEventContext
= context2;
1944
targetStarted1.
BuildEventContext
= context;
1948
targetStarted2.
BuildEventContext
= context2;
1952
messsage1.
BuildEventContext
= context;
1954
messsage2.
BuildEventContext
= context2;
1956
messsage3.
BuildEventContext
= context;
FileLogger_Tests.cs (8)
69
SetUpFileLoggerAndLogMessage("logfile=" + log, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
95
SetUpFileLoggerAndLogMessage("logfile=||invalid||", new BuildMessageEventArgs("message here", null, null, MessageImportance.High) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
122
fl.MessageHandler(null, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
224
SetUpFileLoggerAndLogMessage("encoding=utf-16;logfile=" + log, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
251
SetUpFileLoggerAndLogMessage("encoding=utf-8;logfile=" + log, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
301
SetUpFileLoggerAndLogMessage("logfile=" + log, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
325
SetUpFileLoggerAndLogMessage("append;logfile=" + log, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
350
SetUpFileLoggerAndLogMessage("logfile=" + log, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
TerminalLogger_Tests.cs (16)
264
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
272
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
280
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
288
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
296
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
304
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
312
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
320
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
330
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
338
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
356
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
364
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
373
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
381
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
417
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
723
BuildEventContext
= new BuildEventContext(1, -1, -1, -1) // context that belongs to no project
Microsoft.Build.Framework (2)
AssemblyLoadBuildEventArgs.cs (1)
65
BuildEventContext
= reader.ReadOptionalBuildEventContext();
TaskParameterEventArgs.cs (1)
130
BuildEventContext
= reader.ReadOptionalBuildEventContext();
Microsoft.Build.Framework.UnitTests (54)
CustomEventArgSerialization_Tests.cs (47)
62
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
79
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
95
genericEvent.
BuildEventContext
= null;
104
newGenericEvent.
BuildEventContext
= new BuildEventContext(1, 3, 4, 5);
128
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
145
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
162
genericEvent.
BuildEventContext
= null;
179
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
213
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
228
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
243
genericEvent.
BuildEventContext
= null;
261
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
279
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
297
genericEvent.
BuildEventContext
= null;
331
messageEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
348
messageEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
365
messageEvent.
BuildEventContext
= null;
384
criticalMessageEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
402
criticalMessageEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
419
criticalMessageEvent.
BuildEventContext
= null;
438
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
455
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
472
genericEvent.
BuildEventContext
= null;
489
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
523
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
541
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
560
genericEvent.
BuildEventContext
= null;
590
genericEvent.
BuildEventContext
= new BuildEventContext(7, 8, 9, 10);
654
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
671
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
688
genericEvent.
BuildEventContext
= null;
721
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
739
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
757
genericEvent.
BuildEventContext
= null;
787
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
804
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
822
genericEvent.
BuildEventContext
= null;
851
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
868
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
886
genericEvent.
BuildEventContext
= null;
916
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
934
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
952
genericEvent.
BuildEventContext
= null;
984
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
997
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
1014
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
1027
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
EventArgs_Tests.cs (2)
32
s_baseGenericEvent.
BuildEventContext
= new BuildEventContext(9, 8, 7, 6);
75
startedEvent.
BuildEventContext
= currentBuildEventContext;
ExtendedBuildEventArgs_Tests.cs (5)
29
BuildEventContext
= withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null,
67
BuildEventContext
= withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null,
106
BuildEventContext
= withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null,
144
BuildEventContext
= withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null,
181
BuildEventContext
= withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null,
309 references to BuildEventContext
Microsoft.Build (168)
BackEnd\BuildManager\BuildManager.cs (9)
1084
BuildResult result = _resultsCache!.GetResultsForConfiguration(projectStartedEvent.Value.
BuildEventContext
!.ProjectInstanceId);
2715
? buildEventArgs.
BuildEventContext
!
3123
if (_projectStartedEvents.TryGetValue(e.
BuildEventContext
!.SubmissionId, out var originalArgs))
3125
if (originalArgs.
BuildEventContext
!.Equals(e.
BuildEventContext
))
3127
_projectStartedEvents.Remove(e.
BuildEventContext
.SubmissionId);
3128
if (_buildSubmissions.TryGetValue(e.
BuildEventContext
.SubmissionId, out var submission))
3148
if (!_projectStartedEvents.ContainsKey(e.
BuildEventContext
!.SubmissionId))
3150
_projectStartedEvents[e.
BuildEventContext
.SubmissionId] = e;
BackEnd\Components\Communications\LogMessagePacket.cs (1)
114
var buildEventContext = args.
BuildEventContext
;
BackEnd\Components\Logging\LoggingService.cs (23)
1247
if ((warningEvent = buildEvent as BuildWarningEventArgs) != null && warningEvent.
BuildEventContext
!= null && warningEvent.
BuildEventContext
.ProjectContextId != BuildEventContext.InvalidProjectContextId)
1251
else if ((errorEvent = buildEvent as BuildErrorEventArgs) != null && errorEvent.
BuildEventContext
!= null && errorEvent.
BuildEventContext
.ProjectContextId != BuildEventContext.InvalidProjectContextId)
1255
else if ((messageEvent = buildEvent as BuildMessageEventArgs) != null && messageEvent.
BuildEventContext
!= null && messageEvent.
BuildEventContext
.ProjectContextId != BuildEventContext.InvalidProjectContextId)
1386
if (!_projectFileMap.ContainsKey(projectStartedEventArgs.
BuildEventContext
.ProjectContextId))
1388
_projectFileMap[projectStartedEventArgs.
BuildEventContext
.ProjectContextId] = projectStartedEventArgs.ProjectFile;
1404
return GetWarningsConfigKey(buildEventArgs.
BuildEventContext
);
1623
BuildEventContext = warningEvent.
BuildEventContext
,
1645
BuildEventContext = warningEvent.
BuildEventContext
,
1668
BuildEventContext = warningEvent.
BuildEventContext
,
1689
BuildEventContext = warningEvent.
BuildEventContext
,
1698
int submissionId = errorEvent.
BuildEventContext
?.SubmissionId ?? BuildEventContext.InvalidSubmissionId;
1716
AddWarningsAsErrors(projectStartedEvent.
BuildEventContext
, projectStartedEvent.WarningsAsErrors);
1717
AddWarningsAsMessages(projectStartedEvent.
BuildEventContext
, projectStartedEvent.WarningsAsMessages);
1718
AddWarningsNotAsErrors(projectStartedEvent.
BuildEventContext
, projectStartedEvent.WarningsNotAsErrors);
1721
if (buildEventArgs is ProjectFinishedEventArgs projectFinishedEvent && projectFinishedEvent.
BuildEventContext
!= null)
1982
BuildEventContext context = eventArgs.
BuildEventContext
!;
2006
if (_warningsAsMessagesByProject != null && warningEvent.
BuildEventContext
!= null && warningEvent.
BuildEventContext
.ProjectInstanceId != BuildEventContext.InvalidProjectInstanceId)
2043
if (_warningsAsErrorsByProject != null && warningEvent.
BuildEventContext
!= null && warningEvent.
BuildEventContext
.ProjectInstanceId != BuildEventContext.InvalidProjectInstanceId)
BackEnd\Components\Logging\LoggingServiceLogMethods.cs (1)
514
return args.
BuildEventContext
;
BackEnd\Components\Logging\ProjectLoggingContext.cs (2)
104
: base(nodeLoggingContext, projectStarted.
BuildEventContext
)
184
return args.
BuildEventContext
;
BuildCheck\Infrastructure\BuildCheckBuildEventHandler.cs (10)
76
_checkContextFactory.CreateCheckContext(eventArgs.
BuildEventContext
!),
79
_buildCheckManager.EndProjectEvaluation(eventArgs.
BuildEventContext
!);
87
var checkContext = _checkContextFactory.CreateCheckContext(eventArgs.
BuildEventContext
!);
102
_checkContextFactory.CreateCheckContext(eventArgs.
BuildEventContext
!),
107
_checkContextFactory.CreateCheckContext(eventArgs.
BuildEventContext
!),
120
_checkContextFactory.CreateCheckContext(eventArgs.
BuildEventContext
!),
125
_checkContextFactory.CreateCheckContext(eventArgs.
BuildEventContext
!),
130
_checkContextFactory.CreateCheckContext(eventArgs.
BuildEventContext
!),
152
_buildCheckManager.ProcessBuildFinished(_checkContextFactory.CreateCheckContext(eventArgs.
BuildEventContext
!));
182
private BuildEventContext GetBuildEventContext(BuildEventArgs e) => e.
BuildEventContext
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (6)
652
deferredArgs.BuildEventContext = deferredArgs.
BuildEventContext
!.WithInstanceIdAndContextId(buildEventContext);
683
eventArgs.
BuildEventContext
== null ||
685
eventArgs.
BuildEventContext
.EvaluationId == BuildEventContext.InvalidEvaluationId ||
687
eventArgs.
BuildEventContext
.ProjectInstanceId != BuildEventContext.InvalidProjectInstanceId ||
697
if (!_deferredEvalDiagnostics.TryGetValue(eventArgs.
BuildEventContext
.EvaluationId, out var list))
700
_deferredEvalDiagnostics[eventArgs.
BuildEventContext
.EvaluationId] = list;
BuildCheck\Infrastructure\BuildEventsProcessor.cs (9)
76
evaluationFinishedEventArgs.
BuildEventContext
?.ProjectInstanceId,
93
evaluationFinishedEventArgs.
BuildEventContext
?.ProjectInstanceId,
143
if (taskStartedEventArgs.
BuildEventContext
is not null)
159
projectConfigurationId: taskStartedEventArgs.
BuildEventContext
.ProjectInstanceId,
166
_tasksBeingExecuted.Add(new TaskKey(taskStartedEventArgs.
BuildEventContext
), taskData);
180
if (taskFinishedEventArgs?.
BuildEventContext
is not null)
182
TaskKey taskKey = new TaskKey(taskFinishedEventArgs.
BuildEventContext
);
210
if (taskParameterEventArgs.
BuildEventContext
is not null &&
211
_tasksBeingExecuted.TryGetValue(new TaskKey(taskParameterEventArgs.
BuildEventContext
), out ExecutingTaskData taskData))
BuildCheck\OM\ParsedItemsCheckData.cs (1)
66
: base(evaluationFinishedEventArgs.ProjectFile!, evaluationFinishedEventArgs.
BuildEventContext
?.ProjectInstanceId)
Logging\BinaryLogger\BuildEventArgsWriter.cs (3)
252
buildMessageEventArgs.BuildEventContext = e.
BuildEventContext
?? BuildEventContext.Invalid;
659
Write(e.
BuildEventContext
);
840
if (e.
BuildEventContext
!= null)
Logging\ParallelLogger\ParallelConsoleLogger.cs (81)
439
TargetStartedEventMinimumFields targetEvent = _buildEventManager.GetTargetStartedEvent(errorWarningEventArgs.
BuildEventContext
);
447
ErrorWarningSummaryDictionaryKey key = new ErrorWarningSummaryDictionaryKey(errorWarningEventArgs.
BuildEventContext
, targetName);
514
ErrorUtilities.VerifyThrowArgumentNull(e.
BuildEventContext
, "BuildEventContext");
524
counter.AddEventStarted(e.TargetNames, e.
BuildEventContext
, e.Timestamp, s_compareContextNodeId);
528
if (_deferredMessages.TryGetValue(e.
BuildEventContext
, out var deferredMessages))
538
_deferredMessages.Remove(e.
BuildEventContext
);
548
DisplayDeferredProjectStartedEvent(e.
BuildEventContext
);
562
var projectKey = (e.
BuildEventContext
.NodeId, e.
BuildEventContext
.ProjectContextId);
576
var evaluationKey = GetEvaluationKey(e.
BuildEventContext
);
654
ErrorUtilities.VerifyThrowArgumentNull(e.
BuildEventContext
, "BuildEventContext");
657
ProjectStartedEventMinimumFields startedEvent = _buildEventManager.GetProjectStartedEvent(e.
BuildEventContext
);
664
counter.AddEventFinished(startedEvent.TargetNames, e.
BuildEventContext
, e.Timestamp);
672
_lastProjectFullKey = GetFullProjectKey(e.
BuildEventContext
);
676
WriteLinePrefix(e.
BuildEventContext
, e.Timestamp, false);
717
ShownBuildEventContext(e.
BuildEventContext
);
722
_buildEventManager.RemoveProjectStartedEvent(e.
BuildEventContext
);
749
WriteLinePrefix(e.
BuildEventContext
, e.Timestamp, false);
751
ShownBuildEventContext(e.
BuildEventContext
);
816
WriteLinePrefix(e.
BuildEventContext
, e.Timestamp, false);
818
ShownBuildEventContext(e.
BuildEventContext
);
845
ErrorUtilities.VerifyThrowArgumentNull(e.
BuildEventContext
, "BuildEventContext");
855
counter.AddEventStarted(null, e.
BuildEventContext
, e.Timestamp, s_compareContextNodeIdTargetId);
866
ErrorUtilities.VerifyThrowArgumentNull(e.
BuildEventContext
, "BuildEventContext");
872
counter.AddEventFinished(null, e.
BuildEventContext
, e.Timestamp);
878
DisplayDeferredTargetStartedEvent(e.
BuildEventContext
);
882
TargetStartedEventMinimumFields startedEvent = _buildEventManager.GetTargetStartedEvent(e.
BuildEventContext
);
909
_lastProjectFullKey = GetFullProjectKey(e.
BuildEventContext
);
910
WriteLinePrefix(e.
BuildEventContext
, e.Timestamp, false);
914
WriteMessageAligned(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("TargetMessageWithId", e.Message, e.
BuildEventContext
.TargetId), true);
923
ShownBuildEventContext(e.
BuildEventContext
);
928
_buildEventManager.RemoveTargetStartedEvent(e.
BuildEventContext
);
938
ErrorUtilities.VerifyThrowArgumentNull(e.
BuildEventContext
, "BuildEventContext");
944
DisplayDeferredStartedEvents(e.
BuildEventContext
);
948
bool prefixAlreadyWritten = WriteTargetMessagePrefix(e, e.
BuildEventContext
, e.Timestamp);
952
WriteMessageAligned(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("TaskMessageWithId", e.Message, e.
BuildEventContext
.TaskId), prefixAlreadyWritten);
961
ShownBuildEventContext(e.
BuildEventContext
);
968
counter.AddEventStarted(null, e.
BuildEventContext
, e.Timestamp, null);
979
ErrorUtilities.VerifyThrowArgumentNull(e.
BuildEventContext
, "BuildEventContext");
984
counter.AddEventFinished(null, e.
BuildEventContext
, e.Timestamp);
992
bool prefixAlreadyWritten = WriteTargetMessagePrefix(e, e.
BuildEventContext
, e.Timestamp);
996
WriteMessageAligned(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("TaskMessageWithId", e.Message, e.
BuildEventContext
.TaskId), prefixAlreadyWritten);
1004
ShownBuildEventContext(e.
BuildEventContext
);
1015
if (e.
BuildEventContext
!= null)
1017
var key = (e.
BuildEventContext
.NodeId, e.
BuildEventContext
.ProjectContextId);
1029
ErrorUtilities.VerifyThrowArgumentNull(e.
BuildEventContext
, "BuildEventContext");
1036
_buildEventManager.SetErrorWarningFlagOnCallStack(e.
BuildEventContext
);
1038
TargetStartedEventMinimumFields targetStartedEvent = _buildEventManager.GetTargetStartedEvent(e.
BuildEventContext
);
1045
DisplayDeferredStartedEvents(e.
BuildEventContext
);
1053
WriteLinePrefix(e.
BuildEventContext
, e.Timestamp, false);
1058
ShownBuildEventContext(e.
BuildEventContext
);
1075
ErrorUtilities.VerifyThrowArgumentNull(e.
BuildEventContext
, "BuildEventContext");
1082
_buildEventManager.SetErrorWarningFlagOnCallStack(e.
BuildEventContext
);
1083
TargetStartedEventMinimumFields targetStartedEvent = _buildEventManager.GetTargetStartedEvent(e.
BuildEventContext
);
1091
DisplayDeferredStartedEvents(e.
BuildEventContext
);
1099
WriteLinePrefix(e.
BuildEventContext
, e.Timestamp, false);
1106
ShownBuildEventContext(e.
BuildEventContext
);
1128
if (e.
BuildEventContext
== null && e is AssemblyLoadBuildEventArgs)
1133
ErrorUtilities.VerifyThrowArgumentNull(e.
BuildEventContext
, "BuildEventContext");
1157
&& e.
BuildEventContext
.ProjectContextId != BuildEventContext.InvalidProjectContextId
1158
&& _buildEventManager.GetProjectStartedEvent(e.
BuildEventContext
) == null
1161
if (!_deferredMessages.TryGetValue(e.
BuildEventContext
, out List<BuildMessageEventArgs> messageList))
1164
_deferredMessages.Add(e.
BuildEventContext
, messageList);
1170
DisplayDeferredStartedEvents(e.
BuildEventContext
);
1174
ShownBuildEventContext(e.
BuildEventContext
);
1185
counter.AddEventStarted(null, e.
BuildEventContext
, e.Timestamp, s_compareContextNodeId);
1193
counter.AddEventFinished(null, e.
BuildEventContext
, e.Timestamp);
1212
var evaluationKey = GetEvaluationKey(e.
BuildEventContext
);
1270
if (e.
BuildEventContext
.TaskId != BuildEventContext.InvalidTaskId && e.File == null)
1283
if ((IsVerbosityAtLeast(LoggerVerbosity.Diagnostic) || _showEventId) && e.
BuildEventContext
.TaskId != BuildEventContext.InvalidTaskId)
1285
bool prefixAlreadyWritten = WriteTargetMessagePrefix(e, e.
BuildEventContext
, e.Timestamp);
1286
WriteMessageAligned(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("TaskMessageWithId", nonNullMessage, e.
BuildEventContext
.TaskId), prefixAlreadyWritten, prefixAdjustment);
1293
bool prefixAlreadyWritten = WriteTargetMessagePrefix(e, e.
BuildEventContext
, e.Timestamp);
1313
BuildEventContext currentBuildEventContext = e.
BuildEventContext
;
1343
WriteMessageAligned(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("TargetMessageWithId", targetName, e.
BuildEventContext
.TargetId), prefixAlreadyWritten);
1365
ProjectFullKey currentProjectFullKey = GetFullProjectKey(e.
BuildEventContext
);
1563
ErrorUtilities.VerifyThrowArgumentNull(e.
BuildEventContext
, "BuildEventContext");
1570
DisplayDeferredStartedEvents(e.
BuildEventContext
);
1571
WriteLinePrefix(e.
BuildEventContext
, e.Timestamp, false);
1573
ShownBuildEventContext(e.
BuildEventContext
);
Logging\ParallelLogger\ParallelLoggerHelpers.cs (6)
47
if (!_projectStartedEvents.ContainsKey(e.
BuildEventContext
))
75
_projectStartedEvents.Add(e.
BuildEventContext
, new ProjectStartedEventMinimumFields(projectIncrementKeyLocal, projectTargetKeyLocal, e, parentEvent, requireTimestamp));
85
if (!_targetStartedEvents.ContainsKey(e.
BuildEventContext
))
87
_targetStartedEvents.Add(e.
BuildEventContext
, new TargetStartedEventMinimumFields(e, requireTimeStamp));
399
_buildEventContext = startedEvent.
BuildEventContext
;
520
_buildEventContext = startedEvent.
BuildEventContext
;
Logging\TerminalLogger\ForwardingTerminalLogger.cs (3)
93
if (e.
BuildEventContext
is not null && e.TaskName == MSBuildTaskName)
103
if (e.
BuildEventContext
is not null && e.TaskName == MSBuildTaskName)
111
if (e.
BuildEventContext
is null)
Logging\TerminalLogger\TerminalLogger.cs (13)
711
if (e.
BuildEventContext
is null)
716
ProjectContext c = new(e.
BuildEventContext
);
720
EvalContext evalContext = new(e.
BuildEventContext
);
743
int nodeIndex = NodeIndexForContext(e.
BuildEventContext
);
755
var buildEventContext = e.
BuildEventContext
;
873
var buildEventContext = evalFinish.
BuildEventContext
;
1032
var buildEventContext = e.
BuildEventContext
;
1098
var buildEventContext = e.
BuildEventContext
;
1136
var buildEventContext = e.
BuildEventContext
;
1154
var buildEventContext = e.
BuildEventContext
;
1173
var buildEventContext = e.
BuildEventContext
;
1333
BuildEventContext? buildEventContext = e.
BuildEventContext
;
1422
BuildEventContext? buildEventContext = e.
BuildEventContext
;
Microsoft.Build.Engine.UnitTests (48)
BackEnd\BuildManager_Tests.cs (1)
4010
Assert.True(_logger.AllBuildEvents.OfType<ProjectEvaluationStartedEventArgs>().GroupBy(args => args.
BuildEventContext
.EvaluationId).All(g => g.Count() == 1));
BackEnd\EventSourceSink_Tests.cs (1)
787
BuildEventContext = s_buildWarning.
BuildEventContext
BackEnd\LoggingService_Tests.cs (8)
748
Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.
BuildEventContext
, actualBuildEvent.
BuildEventContext
);
821
Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.
BuildEventContext
, actualBuildEvent.
BuildEventContext
);
886
Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.
BuildEventContext
, actualBuildEvent.
BuildEventContext
);
928
Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.
BuildEventContext
, actualBuildEvent.
BuildEventContext
);
BackEnd\LoggingServicesLogMethod_Tests.cs (2)
1300
Assert.Equal(expectedEventArgs.
BuildEventContext
, actualEventArgs.
BuildEventContext
);
BuildEventArgsSerialization_Tests.cs (7)
96
e => ToString(e.
BuildEventContext
),
168
e => ToString(e.
BuildEventContext
),
270
e => e.
BuildEventContext
.ToString());
609
desArgs.
BuildEventContext
.ShouldBe(args.
BuildEventContext
);
615
desArgs.
BuildEventContext
.ShouldBe(BuildEventContext.Invalid);
911
e => e.
BuildEventContext
.ToString(),
ConsoleLogger_Tests.cs (16)
615
message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword("TaskMessageWithId", "my 1337 message", be.
BuildEventContext
.TaskId);
1732
targetStarted1.BuildEventContext = project1Started.
BuildEventContext
;
1737
taskStarted1.BuildEventContext = project1Started.
BuildEventContext
;
1742
messsage1.BuildEventContext = project1Started.
BuildEventContext
;
1746
taskFinished1.BuildEventContext = project1Started.
BuildEventContext
;
1751
targetFinished1.BuildEventContext = project1Started.
BuildEventContext
;
1755
ProjectStartedEventArgs project2Started = new ProjectStartedEventArgs(2, null, null, "p2", "t2", null, null, project1Started.
BuildEventContext
);
1760
targetStarted2.BuildEventContext = project2Started.
BuildEventContext
;
1765
taskStarted2.BuildEventContext = project2Started.
BuildEventContext
;
1770
messsage2.BuildEventContext = project2Started.
BuildEventContext
;
1774
taskFinished2.BuildEventContext = project2Started.
BuildEventContext
;
1779
targetFinished2.BuildEventContext = project2Started.
BuildEventContext
;
1784
finished2.BuildEventContext = project2Started.
BuildEventContext
;
1789
finished1.BuildEventContext = project1Started.
BuildEventContext
;
1873
ProjectStartedEventArgs project = new ProjectStartedEventArgs(1, "Hello,", "HI", "None", "Build", null, null, messsage1.
BuildEventContext
);
1874
project.BuildEventContext = messsage1.
BuildEventContext
;
Evaluation\EvaluationLogging_Tests.cs (2)
118
buildEvent.
BuildEventContext
.EvaluationId.ShouldBe(evaluationId);
149
var eventEvaluationId = args.
BuildEventContext
.EvaluationId;
Graph\IsolateProjects_Tests.cs (6)
211
logger.Errors.First().
BuildEventContext
.ShouldNotBe(BuildEventContext.Invalid);
213
logger.Errors.First().
BuildEventContext
.NodeId.ShouldNotBe(BuildEventContext.InvalidNodeId);
214
logger.Errors.First().
BuildEventContext
.ProjectInstanceId.ShouldNotBe(BuildEventContext.InvalidProjectInstanceId);
215
logger.Errors.First().
BuildEventContext
.ProjectContextId.ShouldNotBe(BuildEventContext.InvalidProjectContextId);
216
logger.Errors.First().
BuildEventContext
.TargetId.ShouldNotBe(BuildEventContext.InvalidTargetId);
217
logger.Errors.First().
BuildEventContext
.TaskId.ShouldNotBe(BuildEventContext.InvalidTaskId);
Graph\ResultCacheBasedBuilds_Tests.cs (5)
398
results["1"].Logger.Errors.First().
BuildEventContext
.NodeId.ShouldNotBe(BuildEventContext.InvalidNodeId);
399
results["1"].Logger.Errors.First().
BuildEventContext
.ProjectInstanceId.ShouldNotBe(BuildEventContext.InvalidProjectInstanceId);
400
results["1"].Logger.Errors.First().
BuildEventContext
.ProjectContextId.ShouldNotBe(BuildEventContext.InvalidProjectContextId);
401
results["1"].Logger.Errors.First().
BuildEventContext
.TargetId.ShouldNotBe(BuildEventContext.InvalidTargetId);
402
results["1"].Logger.Errors.First().
BuildEventContext
.TaskId.ShouldNotBe(BuildEventContext.InvalidTaskId);
Microsoft.Build.Framework (2)
AssemblyLoadBuildEventArgs.cs (1)
51
writer.WriteOptionalBuildEventContext(
BuildEventContext
);
TaskParameterEventArgs.cs (1)
181
writer.WriteOptionalBuildEventContext(
BuildEventContext
);
Microsoft.Build.Framework.UnitTests (10)
CustomEventArgSerialization_Tests.cs (2)
115
newGenericEvent.
BuildEventContext
.ShouldBe(genericEvent.
BuildEventContext
); // "Expected Event Context to Match"
EventArgs_Tests.cs (8)
105
startedEvent.
BuildEventContext
.ShouldNotBeNull();
115
startedEvent.
BuildEventContext
.SubmissionId.ShouldBe(0);
116
startedEvent.
BuildEventContext
.NodeId.ShouldBe(1);
117
startedEvent.
BuildEventContext
.EvaluationId.ShouldBe(2);
118
startedEvent.
BuildEventContext
.ProjectInstanceId.ShouldBe(3);
119
startedEvent.
BuildEventContext
.ProjectContextId.ShouldBe(4);
120
startedEvent.
BuildEventContext
.TargetId.ShouldBe(5);
121
startedEvent.
BuildEventContext
.TaskId.ShouldBe(6);
Microsoft.Build.Tasks.UnitTests (2)
MSBuild_Tests.cs (2)
1477
var expectedTaskId = logger.TaskStartedEvents.First(t => t.TaskName == "MSBuild").
BuildEventContext
.TaskId;
1513
var expectedTaskId = logger.TaskStartedEvents.First(t => t.TaskName == nameof(BuildProjectFileTask)).
BuildEventContext
.TaskId;
Microsoft.Build.UnitTests.Shared (2)
BuildEventArgsExtension.cs (2)
48
if (args.
BuildEventContext
!= other.
BuildEventContext
)
Microsoft.Build.Utilities.Core (35)
MuxLogger.cs (35)
307
_submissionProjectsInProgress.TryGetValue(e.
BuildEventContext
.SubmissionId, out int value);
308
_submissionProjectsInProgress[e.
BuildEventContext
.SubmissionId] = value + 1;
316
int value = _submissionProjectsInProgress[e.
BuildEventContext
.SubmissionId];
320
_submissionProjectsInProgress.Remove(e.
BuildEventContext
.SubmissionId);
323
_submissionRecords.Remove(e.
BuildEventContext
.SubmissionId);
328
_submissionProjectsInProgress[e.
BuildEventContext
.SubmissionId] = value - 1;
633
if (buildEvent.
BuildEventContext
!= null && buildEvent.
BuildEventContext
.SubmissionId != _submissionId)
675
buildEvent.
BuildEventContext
!= null &&
677
buildEvent.
BuildEventContext
.SubmissionId != _submissionId && /* The build submission does not match the submissionId for this logger */
678
buildEvent.
BuildEventContext
.SubmissionId != BuildEventContext.InvalidSubmissionId))
718
buildEvent.
BuildEventContext
!= null &&
720
buildEvent.
BuildEventContext
.SubmissionId != _submissionId && /* The build submission does not match the submissionId for this logger */
721
buildEvent.
BuildEventContext
.SubmissionId != BuildEventContext.InvalidSubmissionId))
850
if (buildEvent.
BuildEventContext
!= null && buildEvent.
BuildEventContext
.SubmissionId != _submissionId)
859
_firstProjectStartedEventContext = buildEvent.
BuildEventContext
;
906
if (buildEvent.
BuildEventContext
!= null && buildEvent.
BuildEventContext
.SubmissionId != _submissionId)
948
if (buildEvent.
BuildEventContext
!= null && buildEvent.
BuildEventContext
.SubmissionId != _submissionId)
990
if (buildEvent.
BuildEventContext
!= null && buildEvent.
BuildEventContext
.SubmissionId != _submissionId)
1032
if (buildEvent.
BuildEventContext
!= null && buildEvent.
BuildEventContext
.SubmissionId != _submissionId)
1074
if (buildEvent.
BuildEventContext
!= null && buildEvent.
BuildEventContext
.SubmissionId != _submissionId)
1116
if (buildEvent.
BuildEventContext
!= null && buildEvent.
BuildEventContext
.SubmissionId != _submissionId)
1163
if (buildEvent.
BuildEventContext
!= null && buildEvent.
BuildEventContext
.SubmissionId != _submissionId)
1212
buildEvent.
BuildEventContext
!= null &&
1214
buildEvent.
BuildEventContext
.SubmissionId != _submissionId && /* The build submission does not match the submissionId for this logger */
1216
buildEvent.
BuildEventContext
.SubmissionId == BuildEventContext.InvalidSubmissionId && eventIsErrorOrWarning)))
1257
if (projectFinishedEvent != null && buildEvent.
BuildEventContext
?.Equals(_firstProjectStartedEventContext) == true)
Microsoft.DotNet.ArcadeLogging (5)
PipelinesLogger.cs (5)
195
LogErrorOrWarning(isError: true, e.File, e.LineNumber, e.ColumnNumber, e.Code, e.Message, e.
BuildEventContext
);
198
LogErrorOrWarning(isError: false, e.File, e.LineNumber, e.ColumnNumber, e.Code, e.Message, e.
BuildEventContext
);
207
if (!_buildEventContextMap.TryGetValue(e.
BuildEventContext
, out var parentId))
223
if (!_buildEventContextMap.TryGetValue(e.
BuildEventContext
, out Guid projectId) ||
256
_buildEventContextMap[e.
BuildEventContext
] = projectInfo.Id;
TaskUsageLogger (6)
TaskUsageLogger.cs (6)
117
GatherAndEvaluateTasksForProject(p, e.
BuildEventContext
.ProjectContextId);
122
_toolsVersionsByProjectContextId[e.
BuildEventContext
.ProjectContextId] = p.ToolsVersion;
155
_targetIdsToNames[e.
BuildEventContext
.TargetId] = e.TargetName;
169
_targetIdsToNames[e.
BuildEventContext
.TargetId],
172
GetAssemblySpecificationFor(e.TaskName, e.
BuildEventContext
.ProjectContextId, e.ProjectFile),
173
e.
BuildEventContext
.TaskId
XmlFileLogger (31)
ObjectModel\Build.cs (29)
77
var project = GetOrAddProject(targetStartedEventArgs.
BuildEventContext
.ProjectContextId);
88
var project = GetOrAddProject(buildMessageEventArgs.
BuildEventContext
.ProjectContextId);
89
var target = project.GetTargetById(buildMessageEventArgs.
BuildEventContext
.TargetId);
90
var task = target.GetTaskById(buildMessageEventArgs.
BuildEventContext
.TaskId);
101
var project = GetOrAddProject(taskCommandLineEventArgs.
BuildEventContext
.ProjectContextId);
102
var target = project.GetTargetById(taskCommandLineEventArgs.
BuildEventContext
.TargetId);
103
var task = target.GetTaskById(taskCommandLineEventArgs.
BuildEventContext
.TaskId);
117
var project = GetOrAddProject(buildMessageEventArgs.
BuildEventContext
.ProjectContextId);
118
var target = project.GetTargetById(buildMessageEventArgs.
BuildEventContext
.TargetId);
134
var project = GetOrAddProject(buildMessageEventArgs.
BuildEventContext
.ProjectContextId);
135
var target = project.GetTargetById(buildMessageEventArgs.
BuildEventContext
.TargetId);
148
if (buildMessageEventArgs.
BuildEventContext
.TaskId > 0)
150
node = GetOrAddProject(buildMessageEventArgs.
BuildEventContext
.ProjectContextId)
151
.GetTargetById(buildMessageEventArgs.
BuildEventContext
.TargetId)
152
.GetTaskById(buildMessageEventArgs.
BuildEventContext
.TaskId);
154
else if (buildMessageEventArgs.
BuildEventContext
.TargetId > 0)
156
node = GetOrAddProject(buildMessageEventArgs.
BuildEventContext
.ProjectContextId)
157
.GetTargetById(buildMessageEventArgs.
BuildEventContext
.TargetId);
159
else if (buildMessageEventArgs.
BuildEventContext
.ProjectContextId > 0)
161
node = GetOrAddProject(buildMessageEventArgs.
BuildEventContext
.ProjectContextId);
173
var project = GetOrAddProject(taskStartedEventArgs.
BuildEventContext
.ProjectContextId);
174
var target = project.GetTargetById(taskStartedEventArgs.
BuildEventContext
.TargetId);
192
var project = GetOrAddProject(projectStartedEventArgs.
BuildEventContext
.ProjectContextId, projectStartedEventArgs, parent);
234
var project = GetOrAddProject(targetFinishedEventArgs.
BuildEventContext
.ProjectContextId);
235
var target = project.GetTargetById(targetFinishedEventArgs.
BuildEventContext
.TargetId);
246
var project = GetOrAddProject(projectFinishedEventArgs.
BuildEventContext
.ProjectContextId);
256
var project = GetOrAddProject(taskFinishedEventArgs.
BuildEventContext
.ProjectContextId);
257
var target = project.GetTargetById(taskFinishedEventArgs.
BuildEventContext
.TargetId);
258
var task = target.GetTaskById(taskFinishedEventArgs.
BuildEventContext
.TaskId);
ObjectModel\Target.cs (1)
108
Id = e.
BuildEventContext
.TargetId;
ObjectModel\Task.cs (1)
30
Id = taskStartedEvent.
BuildEventContext
.TaskId;