Home What's New Properties Command Line Managing Properties MSI Integration Samples Roadmap


Managing Properties

A spreadsheet can be used to manage the properties for all of your environments in one place. A sample spreadsheet is included in the binary distribution in the samples\spreadsheet folder. Thanks to the fine work of Tom Abraham and code from his Environment Settings Manager, these spreadsheets can now be consumed directly by the XmlPreprocess command line tool, eliminating the need to export the settings into separate settings XML files. This used to be an extra step accomplished by pressing Ctrl-W in the spreadsheet, or using Tom's Environment Settings Manager tool.

Here is a screenshot of the sample spreadsheet. You can define as many environment columns as you need, and as many property rows as you need. This spreadsheet can provide a convenient one-stop management tool for all of your settings across all of your configuration files.


The spreadsheet formats supported are "XML Spreadsheet 2003" (*.xml), or Excel 2003 or older (*.xls). The XML Spreadsheet format is especially nice to use with Source Control, because it can be differenced and merged, unlike the Excel binary format.

To use the spreadsheet at deploymentime you might pass the following switches to XmlPreprocess:

XmlPreprocess.exe /i FileToProcess.config /x MySpreadsheet.xml /e Production

  • /i = input file to process
  • /x = name of settings file saved in SpreadsheetML
  • /e = environment column to use

This eliminates the need for the individual settings files from ever having to be written out to disk. XmlPreprocess will just consume it directly.


Another alternative to the spreadsheet is to use the ConfigDashboard web application (currently available in the source tree) running on top of a SQL Server database (see Schema in the database sample).  This application can import settings from a CSV file for a starting point. XmlPreprocess can read configuration values from a SQL server database, or the dashboard could be extended to expose an endpoint that serves up CSV or XML data.



Another deprecated alternative to the spreadsheet is to use the EditDeploymentSettings application (currently available in the source tree) to manage the *_settings.xml files directly, however beginning with version 2.0 the XML spreadsheet is probably a much better alternative.


It is convenient to deploy this tool using ClickOnce. The only requirement for your settings files is that they be named with the *_settings.xml pattern (example: Production_settings.xml, Deployment_settings.xml, etc.)

Last edited Jul 31, 2013 at 11:26 AM by lorenh, version 18


No comments yet.