I have the following in targetGet in TFS.
<ItemGroup>
<AssemblyInfoFiles Include="$(SolutionRoot)\**\*assemblyinfo.cs" />
</ItemGroup>
<WriteLinesToFile
File="@(AssemblyInfoFiles)"
Lines="AssemblyInformationalVersion("$(LabelName)")]"
Overwrite="false"/>
An element group includes several files, but WriteLinesToFile expects only one file.
And it logs the following error: error MSB4094: "XXXX; YYYY; ZZZZ" is an invalid value for the "File" parameter of the "WriteLinesToFile" task. Multiple items cannot be passed to a parameter of type "Microsoft.Build.Framework.ITaskItem".
How to pass each item from an ItemGroup to a WriteLinesToFile task?
source
share