dotnet / dotnet/msbuild

[Bug]: IEventSource3.IncludeTaskInputs() doesnt actually include Task Input events

Open
#9,804 3 comments 0 reactions 0 assignees View on GitHub
bug Priority:2 triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

### Issue Description

In the [`use-sourceroot-for-relative-paths`](https://github.com/dotnet/msbuild/tree/use-sourceroot-for-relative-paths) branch I'm working on extending Terminal Logger to read the SourceRoot items in the build to discover the current git repo, if any. This is done by

a) [opting in to Task Input events](https://github.com/dotnet/msbuild/blob/use-sourceroot-for-relative-paths/src/MSBuild/TerminalLogger/TerminalLogger.cs#L254-L257)
b) [reacting to the TaskParameterEventArgs events](https://github.com/dotnet/msbuild/blob/use-sourceroot-for-relative-paths/src/MSBuild/TerminalLogger/TerminalLogger.cs#L702-L712)

However, the opt-in from `IEventSource3.IncludeTaskInputs()` isn't causing the events to be fired.

### Steps to Reproduce

* Clone the [`use-sourceroot-for-relative-paths`](https://github.com/dotnet/msbuild/tree/use-sourceroot-for-relative-paths) branch
* Build msbuild with `./build.cmd`
* Copy MSbuild to an 8.0.2xx .NET SDK installation with the enlistment scripts
* Set MSBUILDDEBUGONSTART to 2
* build a project that's in a git repo
* attach a debugger to line 705 in the TerminalLogger.cs file
* see the breakpoint is never hit

### Expected Behavior

TaskParameterEventArgs events should be sent to the logger

### Actual Behavior

No TaskParameterEventArgs events are fired

### Analysis

Per @ladipro, LoggingService.IncludeTaskInputs is not plumbed to interact with BuildParameters.LogTaskInputs.

### Versions & Configurations

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.