dotnet / dotnet/msbuild

ProjectStartedEvents for already-run projects have bad IDs

Open
#12,953 2 comments 0 reactions 1 assignee Claimed by @baronfel View on GitHub
Area: Logging Priority:1 triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

Repro projects: [PSE_invalid_ids.zip](https://github.com/user-attachments/files/24222513/PSE_invalid_ids.zip)

Build with `dotnet msbuild entry.proj -bl`.

Compare the log events for the first (real) `ProjectStartedEventArgs` for for `project1`:

```json
"BuildEventContext": {
"EvaluationId": 36,
"NodeId": 2,
"TargetId": -1,
"ProjectContextId": 36,
"TaskId": -1,
"ProjectInstanceId": 4,
"SubmissionId": 0,
"BuildRequestId": -2001796771
}
```

With the ones emitted the second time (when it's satisfied already and we don't need to do real work in the project):

```json
"BuildEventContext": {
"EvaluationId": -1,
"NodeId": 1,
"TargetId": -1,
"ProjectContextId": 103,
"TaskId": -1,
"ProjectInstanceId": 4,
"SubmissionId": 0,
"BuildRequestId": -2064531812
}
```

`NodeId` is `1` when it should be `2`.

`EvaluationId` is invalid when it should be specified.

(@baronfel and @jaredpar and I have been looking at related areas--this was discovered when Jared started asserting when a specific `ProjectInstanceId` appeared to move between nodes.)

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.