-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Evaluation order of ItemGroup Batching suddenly changed in 16.8 #5937
Comments
Hi acuntex, for further investigation, could you provide a minimal project to reproduce this issue? Or detailed steps to manually reproduce this ourselves? Thanks! |
@v-zhiyul Everything is in the description to reproduce it. |
@v-zhiyul Testet with VS 2017 developer Command prompt and VS 2022 Preview 2 side by side: |
Hi @Scordo thank you for sharing! We can reproduce this issue and contact our engineer in time. Thanks! |
@benvillalobos We verified this issue on VS16.7 and VS16.8. Could you help to take a look? |
Oh boy, testing this with a similar repro project and
AND
@acuntex do you see similar inconsistent behavior like I am? |
@benvillalobos Acuntex is my fellow and we did not have random results. This construct was used to start an external program multiple times and the order did matter. Thats why we detected a change of logic in 16.8. Because the build suddenly failed. We changed the logic because we couldn't wait for you to fix it. :-) We only tried to give you the smallest solution to reproduce the problem and stopped examine the issue. I've ran the script 100 times in 17.0.0-preview-21329-01+1b7661f36 and 16.10.2+857e5a733 and the result is always: B A |
@benvillalobos I see you're using "dotnet build" instead of "msbuild". It should not make a difference but maybe it does? |
Ok, it's random when using "dotnet build" or "dotnet msbuild": Code:
|
@benvillalobos @rainersigwald What is the plan to fix this? Just hit MSB5029! because of this bug!!! Super dangerous bug. |
Issue Description
After installing .NET 5 on our build servers, we noticed that the evaluation order of ItemGroup batching changed, making it a breaking change.
The .NET 5 installer replaced MSBuild 16.X with 16.8.
We were able to create a minimalistic repro scenario.
This also happens if a developer updates visual studio 2019 with the installer to the newest version.
Steps to Reproduce
Expected Behavior
This is also the behavior of MSBuild 16.7 and below.
Actual Behavior
Analysis
In 16.7 and below the batching order seems to be defined by the order of the attributes of
LogIt
in the XML. (the first one defines the order)In 16.8 the batching order seems to be defined by the names of the attributes of
LogIt
in the XML alphabetically. (the last one defines the order)Versions & Configurations
Microsoft (R)-Build-Engine, Version 16.8.2+25e4d540b
Attach a binlog
The text was updated successfully, but these errors were encountered: