What's new in this release:Sorry for the barrage of releases lately, it will slow down now, unless bugs are found in this version. The new feature added in this release was needed for something I was working on recently.
- Added new command line switch (/list or /l) to simply list out the environment names to the console (which you can easily redirect into a file using >). This could be useful if you want to data drive some automated process that uses the available environments and let the spreadsheet be the single source-of-truth.
Here is a fragment of an MSBuild project that uses the /l switch to read the environments into Items for further manipulation
<Exec Command="..\..\bin\XmlPreprocess.exe /l /x SettingsSpreadsheet.xml > Environments.txt"/>
<ReadLinesFromFile File="Environments.txt" >
<Output TaskParameter="Lines" ItemName="EnvironmentItem"/>
The Exec command writes a text file named Environments.txt that looks like this
Then the ReadLinesFromFiles task creates a list of items that can be used for something later in the script. The output of this script looks like
Project "C:\Projects\XmlPreprocess\2.0\samples\spreadsheet\dumpenvironments.proj" on node 0 (default targets).
Done Building Project "C:\Projects\XmlPreprocess\2.0\samples\spreadsheet\dumpenvironments.proj" (default targets).