Strange way to put a question, anyway ... Basically this is my first real attempt with MSBuild.
I managed to create a Target (RenameJs) which produces a new Output Items List named JsMinifyOutput (a renamed version of another input list).
Then, in a dependent Target (ClosureCompile) I'm trying to actually use the previously generated Output list. I have a Message Task as the following, where I can see the Output List values printed on the console:
<Message Text="Outputs: %(JsMinifyOutput.FullPath)" />
But then, in the same dependent Target, when I try to use the Output List in the actual Exec Task, the list seems to be empty. The following task:
<Exec Command="$(ClosureCompilerCmd) --js %(JsMinify.FullPath) --js_output_file %(JsMinifyOutput.FullPath)" />
appears on the console as just:
java -jar Some\Path\To\SomeInputFile.debug.js --js_output_file
while I would expect something like:
java -jar Some\Path\To\SomeInputFile.js --js_output_file Some\Path\To\SomeFileRenamed.js
If I try with this simple Exec Task, it properly shows all file names:
<Exec Command="echo %(JsMinifyOutput.FullPath)" />
What I am trying to achieve here is the following: starting from an input ItemGroup list, create another (output) ItemGroup list by means of some transformation over the former (e.g. renaming, replacing text, ...). Then, having this two ItemGroup lists, loop over them in parallel so to say, and perform an Exec task over them. In pseudo-language, something like:
for(i from 0 to inList.length)
{
Exec Command="Path\To\Some\Command --in inList[i] --out outList[i]
}
Am I doing something completely silly here? PS: This is with Build Engine Version 4.0, .NET Framework Version 4.0