How do I perform the EXEC task in a “loop” with MSBuild ItemGroups?
There are two ways to do this, both are forms of “batching” You can batch a target and perform the Exec and other operations, <Target Name=”ExecMany” Outputs=”%(CachedTables.Identity)”> <Exec Command=”sqlcmd -S … TableName=%22%(CachedTables.Identity)%22 -i …” /> <SomeOtherTask ThatUses=”%(CachedTables.Identity)” /> </Target> The other is to use task batching, just on the Exec task. It is similar, <Target … Read more