Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSBuild eval items only appear on first of multi-targeting inner-builds #531

Closed
AArnott opened this issue Aug 31, 2021 · 2 comments
Closed

Comments

@AArnott
Copy link
Contributor

AArnott commented Aug 31, 2021

After building a multi-targeting project, I see that only the first inner build has msbuild evaluation items presented.
Log here

The outer build has items:
image

The first inner build has items:
image

But the second (and third) inner builds do not have items:
image

@KirillOsenkov
Copy link
Owner

Yes, this has been fixed in newer versions of MSBuild.

For now I'd be curious if you re-run the build with -noconlog (to only have the BinaryLogger and no other loggers) - I expect this will show items on all evaluations.

The timeline of what happened is the following:

  1. Log properties and items on ProjectEvaluationFinished dotnet/msbuild#6287 - Log properties and items on ProjectEvaluationFinished (instead of ProjectStarted)
  2. Don't move Properties and Items to ProjectEvaluationFinished if legacy loggers present dotnet/msbuild#6520 - if any legacy loggers are present (such as Console logger or File loggers) revert to logging properties and items on ProjectStarted (and restore the original bug where these were logged only for the central node instead of all nodes). The situation where you only see them on some projects is because those projects ran in-proc, and MSBuild had a long-standing bug where these weren't sent across nodes.
  3. Console logger support for IncludeEvaluationPropertiesAndItems dotnet/msbuild#6535 - Console logger support for IncludeEvaluationPropertiesAndItems - this "enlightens" the console logger to properly support the new mode, so having a console logger is no longer considered as having a "legacy logger" present.

I'm guessing that the build of MSBuild that you're using is between the steps 2 and 3 of the timeline, so we detect the console logger and turn off the new behavior, so you still get the old-standing MSBuild bug where Items are only logged for the in-proc node.

Turning off the console logger should enable the new behavior (which correctly sends Items from all nodes).

@KirillOsenkov
Copy link
Owner

This should be fixed in the newer SDKs. The last fixes we did that were related to this were:

dotnet/sdk#23834
dotnet/sdk#23249

When those are in, all should work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants