I needed way to create an application configuration file for multiple instances of an ASP.NET web application during a build process. The configuration values are stored in a SQL server database. In this example, I’ll show you how I’ve used an MSBUILD script to loop through a result set from a SQL Server query.   

This example has been simplified to not disclose any sensitive information.


MSBuild Extension Pack

SQL Server Data Tools

The MSBUILD script:

For details on MSBUILD, see this link.

Happy scripting!

Like this post? Share it!