Search code examples
biztalkbiztalk-deploymentbtdf

Generating BTDF settings file generator


I am using BizTalk server deployment framework (Sure many of Biztalkers do so) to generate environment specific bindings. When I'm deploying my solution to a new environment, I'm manually setting connection strings and URLs for sendports/receive locations. Then I am exporting binding file and manually writing Xpaths to a values that change in this environment to a SettingFileGenerator.xml.

This is quite routine job to do and I'm asking if there is a 'smart' (automatic) way to compare my default bindings and bindings of some specific environment to extract Xpaths to a values that differ?


Solution

  • Yes that's correct. You can open the settingsfileGenerator.xml in excel and can add as many variables as you want in left most column and their values in specific environment columns. Use ${variable_name} in master binding file, where variable_name is same as value you have entered in excel left most column.

    In your btdf proj file You should add following properties in PropertyGroup, if not there already

    <RequireXmlPreprocessDirectives>False</RequireXmlPreprocessDirectives>
    <IncludeMessagingBindings>True</IncludeMessagingBindings>
    <UsingMasterBindings>True</UsingMasterBindings>
    

    Please note, this is based on BTDF version 5.0

    In your InstallWizard.xml file make sure you have a ENV_SETTINGS environment variable defined which will be used by MSI to select the specific environment xml before replacing variables in binding file

    <SetEnvUIConfigItem>
        <PromptText>Select the XML file that contains configuration information specific to this environment:</PromptText>
        <PromptValue></PromptValue>
        <ValueType>FileSelect</ValueType>
        <EnvironmentVarName>ENV_SETTINGS</EnvironmentVarName>
      </SetEnvUIConfigItem>