how to get Task inputs from TaskStartedEventArgs? #8248
-
I found the "IEventSource3::IncludeTaskInputs" and I see that selecting "diagnose" level for compilations in Visual Studio does in fact log inputs of tasks, but I have no idea how to find the inputs of tasks from within a TaskStartedEventHandler. What's the purpose of "IncludeTaskInputs"? How does it work? Where are those inputs then? How can I access them? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
They are logged as separate msbuild/src/Build/Logging/BinaryLogger/BuildEventArgsWriter.cs Lines 524 to 536 in eb5ebc2 |
Beta Was this translation helpful? Give feedback.
They are logged as separate
TaskParameterEventArgs
instances, not directly in theTaskStartedEvent
. And there's not (currently, ask if it would help :)) a separate event for them, so you would have to listen toAnyEventRaised
, then filter. An example of that can be found in our binary logger:msbuild/src/Build/Logging/BinaryLogger/BinaryLogger.cs
Line 184 in eb5ebc2
msbuild/src/Build/Logging/BinaryLogger/BuildEventArgsWriter.cs
Line 432 in eb5ebc2
msbuild/src/Build/Logging/BinaryLogger/BuildEventArgsWriter.cs
Lines 524 t…