Description
Issue Description
When the XslTransformation task is called such that the XmlContent parameter is specified and OutputPaths does not have exactly one item, it fails with an MSB3094 error that shows the wrong number of items in each parameter.
Steps to Reproduce
Build this project:
<Project>
<Target Name="Main">
<XslTransformation XmlContent="<dummy/>" XslInputPath="dummy.xslt" OutputPaths="out1;out2" />
</Target>
</Project>
(The dummy.xslt file need not exist.)
Expected Behavior
error MSB3094: "XmlContent" refers to 1 item(s), and "OutputPaths" refers to 2 item(s). They must have the same number of items.
or
error MSB3094: "XmlContent" is specified, and "OutputPaths" refers to 2 item(s). It must have exactly one item.
Actual Behavior
error MSB3094: "XmlContent" refers to 2 item(s), and "OutputPaths" refers to 1 item(s). They must have the same number of items.
Analysis
msbuild/src/Tasks/XslTransformation.cs
Lines 121 to 126 in 51df476
The bug has been there ever since the first public commit.
Versions & Configurations
MSBuild 17.6.0-preview-23108-10+51df47643 from .NET SDK 8.0.100-preview.1.23115.2