This project has moved and is read-only. For the latest updates, please go here.

Using Biztalk Deployment Framework with multiple BizTalk Applications

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

Hello, 

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)
-----------Orchistration
-----------Schemas
-----------Transforms
-----------etc
------"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?

 

Thanks 

Jan 18, 2012 at 7:30 PM

Hi,

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.

Thanks,
Tom

Jan 8, 2014 at 4:27 AM
Hi,

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)
------Deployment.btdfproj
---BizTalk (folder)
------"Application1" (Folder)
-----------Deployment (folder)
--------------Deployment.btdfproj
-----------Orchestration
-----------Schemas
-----------Transforms
-----------etc
------"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="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Installer" ToolsVersion="4.0">
  <PropertyGroup>
    <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
    <DeploymentFrameworkTargetsPath>$(MSBuildExtensionsPath)\DeploymentFrameworkForBizTalk\5.0\</DeploymentFrameworkTargetsPath>
    <ApplicationListToDeploy>..\BizTalk\Application1\Deployment\Deployment.btdfproj;..\BizTalk\Application2\Deployment\Deployment.btdfproj;..\BizTalk\Application3\Deployment\Deployment.btdfproj</ApplicationListToDeploy>
    <ApplicationListToUndeploy>..\BizTalk\Application3\Deployment\Deployment.btdfproj;..\BizTalk\Application2\Deployment\Deployment.btdfproj;..\BizTalk\Application1\Deployment\Deployment.btdfproj</ApplicationListToUndeploy>
  </PropertyGroup>
  <Import Project="$(DeploymentFrameworkTargetsPath)BizTalkDeploymentFramework.targets" />
  <ItemGroup>
    <BizTalkHosts Include="MyHost" />
  </ItemGroup>
  <Target Name="Deploy">
    <MSBuild Projects="$(ApplicationListToDeploy)" Targets="Deploy" Properties="Configuration=$(Configuration)" />
  </Target>
  <Target Name="Undeploy">
    <MSBuild Projects="$(ApplicationListToUndeploy)" Targets="Undeploy" Properties="Configuration=$(Configuration)" />
  </Target>
  <Target Name="Installer">
    <MSBuild Projects="$(ApplicationListToDeploy)" Targets="Installer" Properties="Configuration=$(Configuration)" />
  </Target>
  ... etc.
  </Target>
</Project>
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.

Kit