Using Biztalk Deployment Framework with multiple BizTalk Applications

Topics: General Questions, Getting Started/Beginner, Tips and Tricks, Visual Studio Integration
Jan 18, 2012 at 11:45 AM


I have a question regarding implementing BTDF on my BizTalk soulution that include 6 BizTalk Applications. 

In my Visual Studio I have added one Soulution Folder on each BizTalk Application like this:

- Solution "mySolution
---BizTalk (folder)
------"Application1" (Folder)
------"Application2" (Folder)
------"Application3" (Folder)
------"Application4" (Folder)
------"Application5" (Folder)
------"Application6" (Folder) 

How is the best way to implement BTDF like this?
I have tried to add BTDF project at the Solution Root, but then I have problems with deploying 6 BizTalk Application into Biztalk
I have also tried to add BTDF project under each solution folder for each BizTalk Application, but then I get a error message: "Could not find a .btdfproj file..."

Does anyone have some tips for me on how to solve this problem?



Jan 18, 2012 at 6:30 PM


You will find a number of other discussions on this topic here, but I'll give you the summary again.

The Deployment Framework Visual Studio add-in is oriented around a single solution.  The add-in expects to find one .btdfproj in one of several possible folder/filename locations within the solution directory, commonly Deployment\Deployment.btdfproj.

The Deployment Framework itself is built around one .btdfproj = one BizTalk app.

In your situation, you need one Deployment Framework project folder for each application.  If you want to keep them all in the same solution, then your integrated Visual Studio functionality will be limited due to the restriction of the add-in itself.  You could manually execute all of the same commands that the add-in would generate for each of your applications, but you lose the convenience factor.  The Deployment Framework itself isn't the issue here, just the add-in.

If you want to keep the Visual Studio BTDF functionality, I'd recommend creating one SLN file for each application, if possible.  They can all be in the same directory and keep the overall folder structure unchanged.  In a future release, perhaps the add-in can be enhanced to recognize multiple .btdfproj's within a single solution.


Jan 8, 2014 at 3:27 AM

We had a similar requirement for our project where we had one solution containing multiple BizTalk Applications. I came up with a workaround so that the Deployment Framework Visual Studio add-in still worked with multiple .btdfproj in one solution. Taking the above example:

Solution "mySolution"
---Deployment (folder)
---BizTalk (folder)
------"Application1" (Folder)
-----------Deployment (folder)
------"Application2" (Folder)
------"Application3" (Folder)

There was one .btdfproj per application for managing deployment, undeployment, creating msi etc. for each application. At the solution level, I also added a master Deployment.btdfproj file under the Deployment folder. This is the .btdfproj file that the Visual Studio add-in will invoke.

In the master Deployment.btdfproj file, it has a list of targets that matches those that the add-in invokes, e.g. "Deploy", "Undeploy", "Installer". Under each target, it calls MSBuild to subsequently call the "child" .btdfproj in each application in the order defined to carry out the corresponding actions. Below is a sample master Deployment.btdfproj file:
<Project xmlns="" DefaultTargets="Installer" ToolsVersion="4.0">
    <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
  <Import Project="$(DeploymentFrameworkTargetsPath)BizTalkDeploymentFramework.targets" />
    <BizTalkHosts Include="MyHost" />
  <Target Name="Deploy">
    <MSBuild Projects="$(ApplicationListToDeploy)" Targets="Deploy" Properties="Configuration=$(Configuration)" />
  <Target Name="Undeploy">
    <MSBuild Projects="$(ApplicationListToUndeploy)" Targets="Undeploy" Properties="Configuration=$(Configuration)" />
  <Target Name="Installer">
    <MSBuild Projects="$(ApplicationListToDeploy)" Targets="Installer" Properties="Configuration=$(Configuration)" />
  ... etc.
For example, when the Deploy button of the add-in is clicked, it will deploy all the applications in the solution in the defined order.

Hope this helps.