/n with #foreach

Jun 18, 2010 at 9:53 AM

Hi,

first: great project, thanks!

Is there a way to combine the /n parameter with #foreach? Im using XML files with directly embedded ${xxx} statements instead of the #ifdef syntax. But now I want to include the #foreach statement... I was hoping for something like this:

<root>
  <element>${simple}</element>
  <!-- #foreach (multiple) -->
  <another>${multiple}</another>
  <!-- #endforeach -->
</root>
Eljakim

Coordinator
Jun 21, 2010 at 3:16 PM
I know it's a hack, but have you considered processing the file twice? Once to resolve the foreach, then a second time with the /n to do everything else? Have you looked at the new msdeploy features, it's tough to find documentation on it, and I've never tried using it myself, but it looks promising: http://ddj.com/visualstudio/224201017
Jun 22, 2010 at 5:55 AM

Hi,

I'm using the xmlpreprocessor in BTDF (http://biztalkdeployment.codeplex.com/). I think it would be possible to modify the target files to run the processor twice, thanks!

E.