BizTalk Server Tutorial

BizTalk Server Concepts and Common Errors

Walkthrough Using BizTalk Deployment Framework (BTDF)

BTDF is a fastest way of deploying BizTalk Applications. Thanks to the creators of BTDF.

In this post, I am going to show how to use BizTalk Deployment Framework to deploy BizTalk Server 2010 Applications and IIS Virtual Directories
These simple steps give you a basic understanding of using BTDF 5.0

1. Start by Downloading and Installation BizTalk Deployment Framework 5.0 from the website http://biztalkdeployment.codeplex.com/
2. Create a simple BizTalk Solution with the following projects.

a. Schemas Project – with two schemas.
b. Maps Project – With simple transformation between schemas
c. Orchestration Project – With a simple Orchestration to receive a Message, Transform & Send the Message.
d. Pipelines Project – With a Receive Pipeline using XmlDisassembler Component.
e. C# Class Library – With a Utility class that is used in Map

1

3. Once you install BTDF 5 (BizTalk Deployment Framework) you will see a new Project Template added to Visual Studio. Add a new BizTalk Deployment Project to the Current Solution.
2
4. A Project Options window will open asking to select few properties that you need. From the properties, mark the desired options as True (A few common properties are highlighted below).

3

5. Once Create Project is clicked; a set of deployment files will be added to your solution.

4

6. However these will not be added to Visual Studio. You have to add them to Visual Studio by using Add Existing Item option.

5

6
7. A deployment file “Deployment.btdfproj” will be opened automatically. This is the main build file which controls the deployment.

8. The first property group is the one which controls the major settings of the deployment Process.

Note:
a. Intellisense of Visual Studio works here. You can select which all Artifacts of BizTalk would be included in the MSI File.
7
b. A description of each property can be found in the BTDF documentation available here.
c. Most common properties to be included will be like below.

8

d. Important Properties to Note

1. If you have any Custom .NET Components which are to be GACed, then you have to set IncludeComponents = True
2. If you have any virtual directories (if schema / orchestration is published as a Web/WCF service) then you have to set IncludeVirtualDirectories = True

9. Now we need to include all the Artifacts which are part of our project in the Item Group Section.

9

10. In the below highlighted part, the value of $(ProjectName) & $(Configuration) will be replaced with the corresponding values that you specify in PropertyGroup Section (shown in step 8) at runtime.

For example: if my schemas dll is located at “C:\Projects\BizTalkDeployment\DeploySchemas\bin\Debug” then I would specify LocationPath property as “..\DeploySchemas\bin\$(Configuration)”

For the sample Project I have created in step 2, I am going to modify ItemGroup as below.
10

11. Once BizTalk Deployment Framework generates MSI File, it will automatically import binding file and starts the application. The binding file for this purpose has to be made available to BTDF in PortBindingsMaster.xml

13

12. If you already have a Binding file for your Application, copy its contents and paste it in PortBindingsMaster.xml. If you don’t have a binging file already, deploy the BizTalk Application Normally, Configure it and generate the Binding File.

14

13. Copy the Text from the Binding File generated from above step and paste it in PortBindingsMaster.xml
15

Note: This feature is controlled by the setting True in Property Group (step 8)

14. Once this is done, go to Tools Menu -> Deployment Framework for BizTalk -> Build Server Deploy MSI.
16
15. This will complete Generation of MSI file.

17

16. The MSI file will be available in ..\bin\Debug folder

18

Installing the BizTalk BTDF MSI file:
1. Open the MSI File & follow the steps.

19

2. In order to modify the EULA, you can edit the word document “Licence.rtf” as shown in Step 6 (above)

20

3. At the end, Check the CheckBox and click Finish
21

4. This will start installation of MSI to BizTalk. Provide your Windows User-Id

22

5. In the Next Step, Click on Browse, Go to Environment Settings – > Select any XML file. (Note: Selecting any of the File doesn’t have any impact in this example. More details on How to Use this Environment Settings file in my Next Post)

23

6. In the next step, check the checkbox and click Finish.
24

7. This will complete the Installation.

25

8. Application would be automatically deployed and started in Admin Console. In case of any errors, a Log file will be available in your Installation Directory – <C:\Program Files (x86)\BizTalkDeployment for BizTalk\>1.0\DeployResults

Hope this helps. See the next post on how to use SettingsFileGenerator.xml to automatically generate / use different bindings for different environments.

– Shiv

Web Counters

February 5, 2013 - Posted by | Deployment, General | , , , , , , ,

3 Comments »

  1. Hi Shiv ,
    Everything works fine but for me Deployment is not happening properly. Please find below the DeployResults.txt file contents

    *********************************************************************************************************************************************************

    Build started 26/05/2013 06:13:07 PM.
    __________________________________________________
    Project “C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\LearnBTSDeploymentFramework.Deployment.btdfproj” (Deploy target(s)):

    Target Deploy:
    Target ServerDeploy:
    Target DeployBizTalkMgmtDB_true:
    Target SetWinVer:
    Running on Windows V62
    Detected IIS 7
    Detected 64-bit OS
    Target GetSoftwarePaths:
    Using .NET Framework Install Path ‘C:\Windows\Microsoft.NET\Framework\v4.0.30319’.
    Using BizTalk Install Path ‘C:\Program Files (x86)\Microsoft BizTalk Server 2010\’.
    Using Deployment Framework Install Path ‘C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\’.
    Using Deployment Framework Tools Path ‘C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\DeployTools’.
    Using BizTalk ESB Toolkit Install Path ‘C:\Program Files (x86)\Microsoft BizTalk ESB Toolkit 2.1\’.
    Target ExportSettings:
    “C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\DeployTools\EnvironmentSettingsExporter.exe” “C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\EnvironmentSettings\SettingsFileGenerator.xml” “C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\EnvironmentSettings”
    Environment Settings Spreadsheet to XML Exporter 1.6.1
    [http://EnvSettingsManager.codeplex.com]
    Copyright (C) 2007-11 Thomas F. Abraham. All Rights Reserved.

    Importing from SettingsFileGenerator.xml…

    Output format is XmlPreprocess (multi-file).

    Exporting to Exported_LocalSettings.xml…
    Exporting to Exported_DevSettings.xml…
    Exporting to Exported_TestSettings.xml…
    Exporting to Exported_ProdSettings.xml…

    Finished.
    Target InitSettingsFilePath:
    Using settings file C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\EnvironmentSettings\SettingsFileGenerator.xml
    Target SetPropertiesFromEnvironmentSettings:
    Setting properties from environment settings file (C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\EnvironmentSettings\SettingsFileGenerator.xml)
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets : warning : Could not find a property value in the environment settings XML file ‘C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\EnvironmentSettings\SettingsFileGenerator.xml’ using the XPath ‘/settings/property[@name=’SsoAppUserGroup’]’.
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets : warning : Could not find a property value in the environment settings XML file ‘C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\EnvironmentSettings\SettingsFileGenerator.xml’ using the XPath ‘/settings/property[@name=’SsoAppAdminGroup’]’.
    Done building target “SetPropertiesFromEnvironmentSettings” in project “LearnBTSDeploymentFramework.Deployment.btdfproj”.
    Target InitializeAppName:
    BizTalk Application Name is LearnBTSDeploymentFramework
    Target PreprocessBindings:
    Clearing file attributes for ‘PortBindings.xml’.
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : A task error has occured.\r
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : Message = The resource string “FileNotFound.Exception” for the “SetValue” task cannot be found. Confirm that the resource name “FileNotFound.Exception” is correctly spelled, and the resource exists in the task’s assembly.\r
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : Value = LearnBTSDeploymentFramework\r
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : IgnoreNoMatchFailure = True\r
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : Force = True\r
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : XPath = //ApplicationName\r
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : Path = PortBindings.xml\r
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : Namespaces = \r
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : \r
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : at Microsoft.Build.Shared.ErrorUtilities.VerifyThrowArgument(Boolean condition, Exception innerException, String resourceName, Object arg0, Object arg1)\r
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : at Microsoft.Build.Utilities.TaskLoggingHelper.FormatResourceString(String resourceName, Object[] args)\r
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : at Microsoft.Sdc.Tasks.XmlFile.BaseXmlFileTask.OpenXmlFile(String path)\r
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : at Microsoft.Sdc.Tasks.XmlFile.SetValue.InternalExecute()\r
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : at Microsoft.Sdc.Tasks.TaskBase.Execute()
    Done building target “PreprocessBindings” in project “LearnBTSDeploymentFramework.Deployment.btdfproj” — FAILED.
    Done building target “DeployBizTalkMgmtDB_true” in project “LearnBTSDeploymentFramework.Deployment.btdfproj” — FAILED.
    Done building target “ServerDeploy” in project “LearnBTSDeploymentFramework.Deployment.btdfproj” — FAILED.
    Done building target “Deploy” in project “LearnBTSDeploymentFramework.Deployment.btdfproj” — FAILED.

    Done building project “LearnBTSDeploymentFramework.Deployment.btdfproj” — FAILED.

    Build FAILED.

    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets : warning : Could not find a property value in the environment settings XML file ‘C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\EnvironmentSettings\SettingsFileGenerator.xml’ using the XPath ‘/settings/property[@name=’SsoAppUserGroup’]’.
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets : warning : Could not find a property value in the environment settings XML file ‘C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\EnvironmentSettings\SettingsFileGenerator.xml’ using the XPath ‘/settings/property[@name=’SsoAppAdminGroup’]’.
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : A task error has occured.\r
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : Message = The resource string “FileNotFound.Exception” for the “SetValue” task cannot be found. Confirm that the resource name “FileNotFound.Exception” is correctly spelled, and the resource exists in the task’s assembly.\r
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : Value = LearnBTSDeploymentFramework\r
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : IgnoreNoMatchFailure = True\r
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : Force = True\r
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : XPath = //ApplicationName\r
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : Path = PortBindings.xml\r
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : Namespaces = \r
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : \r
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : at Microsoft.Build.Shared.ErrorUtilities.VerifyThrowArgument(Boolean condition, Exception innerException, String resourceName, Object arg0, Object arg1)\r
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : at Microsoft.Build.Utilities.TaskLoggingHelper.FormatResourceString(String resourceName, Object[] args)\r
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : at Microsoft.Sdc.Tasks.XmlFile.BaseXmlFileTask.OpenXmlFile(String path)\r
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : at Microsoft.Sdc.Tasks.XmlFile.SetValue.InternalExecute()\r
    C:\Program Files (x86)\LearnBTSDeploymentFramework for BizTalk\1.0\Deployment\Framework\BizTalkDeploymentFramework.targets(1172,5): error : at Microsoft.Sdc.Tasks.TaskBase.Execute()
    2 Warning(s)
    1 Error(s)

    Time Elapsed 00:00:01.99

    ******************************************************************************************************************************

    Please help.

    Regards
    Gaurav

    Comment by Gaurav Sood | May 26, 2013 | Reply

  2. […] is in continuation to my previous posts on BTDF Basics and Using Environment specific binding […]

    Pingback by Walkthrough Using BizTalk Deployment Framework (BTDF) – 3 Deploying Virtual Directories « BizTalk Server Tutorial | February 8, 2013 | Reply

  3. […] This is in continuation to my previous post on  Walkthrough Using BizTalk Deployment Framework (BTDF) 1 […]

    Pingback by Walkthrough Using BizTalk Deployment Framework (BTDF) – 2 (Using Environment Specific Binding Files) « BizTalk Server Tutorial | February 5, 2013 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: