Packaging an Application for Deployment

Parent Previous Next

The first step to deploying your application to a BizTalk server is packaging it into an MSI, which can be done either manually in Visual Studio or through a command-line script.


Files Included in the MSI by Default

The Deployment Framework for BizTalk automatically includes all files referenced within your deployment project file.  This includes orchestration assemblies, custom .NET assemblies, pipeline component assemblies, rule policy files, ESB itineraries, etc.


To include miscellaneous individual files (vs. an entire folder or a large number of files) in the MSI, you may simply include one or both of the ItemGroup's ExternalAssemblies (.NET DLL's to be installed in the GAC) or AdditionalFiles (miscellaneous files).  They will be automatically included in the MSI.


The first packaging step is to copy all necessary files to a staging directory.  You'll find this temporary staging directory under <deploymentProjectFolder>\obj\<solutionConfiguration>\redist.  For example, <solutionRoot>\Deployment\obj\Release\redist.  If you install your MSI on a server and find that a file is missing, then look to the staging directory on the machine that built the MSI.  If a file doesn't get copied there, it will not be part of the MSI.


Including User-Defined Files in the MSI

In your deployment project file, the path to the staging directory is available in an MSBuild property named RedistDir (reference as $(RedistDir)).  You may copy any extra files that you wish to include in the MSI inside a target named CustomRedist, placed after all Import elements.  Remember that the Deployment Framework automatically copies all files referenced within the project file, so you only need to use CustomRedist if you have extra files that are not recognized by the Deployment Framework.


For example, the following target copies everything within the ..\TestFiles folder into the MSI staging folder:


<Target Name="CustomRedist">

 <MakeDir Directories="$(RedistDir)\TestFiles" />


 <!-- Force MSBuild to expand the item spec into physical file specs -->

 <CreateItem Include="..\TestFiles\**\*.*">

   <Output TaskParameter="Include" ItemName="TestFilesSourceGroup" />

 </CreateItem>


 <Copy DestinationFolder="$(RedistDir)\TestFiles\%(RecursiveDir)" SourceFiles="@(TestFilesSourceGroup)"/>

</Target>



Created with the Personal Edition of HelpNDoc: Free iPhone documentation generator