When you work on a BTDF project, having multiple partial binding masters (i.e : the complete binding master of the BizTalk application is split in many different files) can be useful in several respects :
The standard behavior of BTDF does not support multiple binding master files (you can only provide 1 file name in the PortBindingsMaster property). Note that I have found the following article on Technet, very interesting but addressing a different case : the author uses 1 binding master per environment (and each of the files being different of course) whereas we aim to use several binding masters regardless of the environment.
The solution is to disable the standard binding management feature of the BTDF and rely instead on the common XML preprocessing feature.
Here is how :
Edit your .btdfproj project file. Then for each binding master, add a FilesToXmlPreProcess item with a FileType element, as shown below :
<FilesToXmlPreprocess Include=”RelativePathToYouBindingMaster\Master.Binding.Flow1.xml”>
<OutputFilename>Binding.Flow1.xml</OutputFilename>
<FileType>binding</FileType>
</FilesToXmlPreprocess>
For this, you will have to edit the BizTalkDeploymentFramework.targets file (in C:\Progam Files (x86)\MSBuild\BizTalkDeploymentFramework\5.0) :
<Target Name=”ImportBindings” DependsOnTargets=”InitializeAppName” Condition=”‘$(IncludeMessagingBindings)’ == ‘true'” >
<!– Only target the FilesToXmlPreprocess with FileType = ‘binding’ –>
<ItemGroup>
<DeployPortBindingsGroup Include=”%(FilesToXmlPreprocess.OutputFilename)” Condition=”‘%(FileType)’==’binding'” />
</ItemGroup>
<Message Text=”No binding file to process” Importance=”High” Condition=”‘@(DeployPortBindingsGroup)’==”” />
<!– Override the target application name –>
<WriteXmlValue XmlFilenames=”Resources\Bindings\%(DeployPortBindingsGroup.Identity)” XPath=”//ApplicationName” Value=”$(BizTalkAppName)” Condition=”‘@(DeployPortBindingsGroup)’!=”” />
<!– Import the binding files –>
<Exec Command=”BTSTask.exe ImportBindings -Source:"Resources\Bindings\%(DeployPortBindingsGroup.Identity)" -ApplicationName:"$(BizTalkAppName)"”
Condition=”‘@(DeployPortBindingsGroup)’!=”” />
<Pause Message=”Press a key to continue…” Condition=”‘$(Interactive)’ == ‘true'” />
<OnError ExecuteTargets=”PauseForError” />
</Target>
That should do the trick. Enjoy 😉