BTDF – Generate specific environment binding

BizTalk Deployment Framework (BTDF) is known as the best way to perform BizTalk artifacts installation.
It’s also the only way (I know) to create an automatic BizTalk deployment.

If you don’t know what is BTDF, go to  https://biztalkdeployment.codeplex.com.

This Framework allow us to create an MSI deployment package directly  from Visual Studio or Command Line.
It also has a great feature that allow us to maintain only one binding file concerning all environments.
That binding template files are replaced for the correct environment data in the MSI generation.
The specific environment data is configured in a XML file that can be opened in Excel.

Sometimes there are releases that only have binding changes, and you want to use the best practice of always use BTDF generated data in your deployments.
So… how can you deal with this in BTDF.!! The VS menu does not have an option to generate environment bindings.

The BTDF installation give us a tool called xmlpreprocess, which is used in the MSI generation by the BTDF engine.
Xmlpreprocess tool allow us to merge a specific environment configuration with the binding template (normally named master binding), resulting in the transformed deployment binding.

It’s very easy to use.

  1. Open a Command Line Prompt
  2. Navigate to the  BTDF install folder “..\Framework\DeployTools” (normally  C:\Program Files (x86)\Deployment Framework for BizTalk 5.6\Framework\DeployTools)
  3. Execute xmlpreprocess.exe /v /c /noDirectives /i:”PORT_BINDINGS_MASTER_XML_PATH” /o:” OUTPUT_BINDING_FILE_PATH” /d:CurDir=”MAIN_SOLUTION_FOLDER” /s:”ENVIRONMENT_TO_GENERATE_BINDING_CONFIG_XML”

For example

xmlpreprocess.exe /v /c /noDirectives /i:”C:\Projects\MyProject\Deployment\PortBindingsMaster.xml” /o:”C:\Projects\MyProject\GeneratedBindings\OutputBinding.xml” /d:CurDir=”C:\Projects\MyProject” /s:”C:\Projects\MyProject\Deployment\EnvironmentSettings\Exported_ProdSettings.xml”

The generated environment (Local, QA, PRD, …) is defined in xml file path after the “/s” parameter.

Hope this helps.

 

Leave a Reply

Your email address will not be published. Required fields are marked *