MSBuild using SQL Script parameters
I have been working with MSBuild and the Microsoft.Sdc.Tasks to deploy my current project’s databases. Some of the SQL scripts that are executed within MSBuild need parameters to be set to create the database objects, which the Microsoft.Sdc.Tasks.Sql.Execute method supports. To use parameters within MSbuild and SQL.Execute; firstly create an item group (<ItemGroup>) then create element of any name as this will become the name of the item that can be referred to in MSbuild. Within the new element an attribute has to set called “Include”, then create two other elements called “name” and “value”. Here is an example: <ItemGroup> <schemaName Include=”true”> <name>@pTableName</name> <value>’sys.Objects’</value> </schemaName> ...