Switch batching method in order to get all build errors from multi-targeted projects #10872
Labels
Category:Quality Week
Issues that should be considered for quality week
Functionality:Restore
Priority:2
Issues for the current backlog.
Type:Bug
When you try to build a project that requires a workload you don’t have, you will get an error like the following:
For multi-targeted projects, we should report all the missing workloads. Currently, a project multi-targeting to net6.0-android and net6.0-ios will generate separate errors for each inner build:
This is probably OK, though it might be nice to combine these into a single error that lists both missing workloads.
However, you have to restore before you can build, and currently restore errors out when the first inner build fails and so doesn’t report both missing workloads:
We should fix this so that you get both errors from restore.
Looking at binlogs, I think the reason for the difference is that the _GenerateProjectRestoreGraphAllFrameworks uses the MSBuild task’s Properties parameter with a batched value:
On the other hand, to do the inner builds, the DispatchToInnerBuilds target doesn’t use the Properties parameter at all:
Rather, the Projects items it passes in have AdditionalProperties metadata, which is set in the _ComputeTargetFrameworkItems target:
Could we update the NuGet targets to use AdditionalProperties metadata instead of the Properties MSBuild task parameter, and see if that results in errors from all of the inner builds being reported?
The text was updated successfully, but these errors were encountered: