RobustHaven.Tasks (MSBuild)

This product includes the custom MSBuild tasks our team has created for internal use.

Tasks:

  • FlexibleConfig.FlexibleConfigTask
  • DBChangeManagement.MSBuildTask.MSSQLTask

How do you use the tasks?

This example shows how the two tasks complement one another. The FlexibleConfigTask is used to conditionally write the connection string based on the developer running the task. The output is written to "\MSBuild\bin\MSBuild.config".

The MSSQLTask uses the generated configuration file to rebuild the database starting from the backup and then executing all scripts located in the UpdateScriptLocation folder.

	<Target Name="DatabaseChangesSync">
		<Message Text="Creating MSBuild.config" />
		<FlexibleConfig.FlexibleConfigTask
			Parameters="@(FlexibleConfigParameters)"
			BaseLineFile="$(MSBuildStartupDirectory)\MSBuild\MSBuild.config"
			ErrorLogFile="$(MSBuildStartupDirectory)\MSBuild\bin\Error.log"
			OutputFile="$(MSBuildStartupDirectory)\MSBuild\bin\MSBuild.config"
		/>
		
		<Message Text="Executing - Database Change Management" />
		<DBChangeManagement.MSBuildTask.MSSQLTask
			TaskConfiguration="$(MSBuildStartupDirectory)\MSBuild\bin\MSBuild.config"
			EnvironmentName="Development"
			BackupLocation="$(MSBuildStartupDirectory)\Database\robusthavenaspnetmvc.bak"
			DatabaseName="robusthavenaspnetmvc"
			ConnectionStringKey="dbhReader"
			UpdateScriptsLocation="$(MSBuildStartupDirectory)\Database"
		/>
	</Target>

FlexibleConfig.FlexibleConfigTask

This task provides flexibility by conditionally merging a file. Conditions can be any valid CSharp boolean expression. In practice, this can be used to merge settings specific to a user (distributed workforce not sharing a common infrastructure) or environment(integration/QA/production).

Detailed usage of this task.

DBChangeManagement.MSBuildTask.MSSQLTask

This task provides a strategy to manage database changes during development.

Project 1

usage example 1

Project 2

This screenshot shows DoNotRelease keyword in the filename so that when the EnvironmentName is Production it will not execute.

usage example 2



The cost is $35.00 for binaries with examples.

$500 if you want full source with our unit tests (cannot be resold).

All updates to this product, up to a year after purchase, are free.