In developing with BizTalk, I've had clients needing simple to use MSI packages instead of "complex" NAnt scripts. Creating MSI packages to deploy a BizTalk solution is fairly simple, but using the BTSICustomAction to deploy the contained assemblies and bindings is somewhat of a less trivial task.
The issues my clients encountered when using MSI packages created using BTSICustomAction are:
- Inability to edit binding files before actual deployment, hence needing multiple MSI packages for each server configuration
- Not all assemblies are removed when uninstalling, due to these assemblies being either used by active/suspended instances of Orchestrations or having bindings with Orchestrations not in unenlisted state.
- No feedback within the MSI packages about the deployment of the contained components. Having to manually iterate through all logfiles created.
Acting on this information, I've decided to create a replacement Custom Action library, which allows users to edit bindings before deploying them, asks whether or not to kill running Orchestrations upon uninstall to ensure proper removal of affected assemblies and provides feedback about what went on during deployment/removal.
The Custom Action I've created is used in exactly the same manner the BTSICustomAction is used, it takes a parameter DEPLOY, which, when set to true tells the BizTalkInstaller class to actually deploy (install the assemblies and run the binding files) the components. If the parameter is missing or not set to "true", contained assemblies are installed into the GAC, but no binding files are executed.
Also, when uninstalling, all files installed without DEPLOY=true will still be checked for any bindings which might keep them from being removed.
Using the component is easy:
- Create a new "Setup Project"
- Add your components to the project
- Add your exported bindings to the project
- Add the custom action BizTalkInstaller to each section in the Custom Action Editor, setting "CustomActionData" within the Install section to "/DEPLOY=true" if you want bindings to be executed, or nothing if you don't want that.
At this stage, you're actually ready to build the Setup Project and deploy it. BTSICustomAction forced you to include two extra files within the Setup Project:
- btstd.xml (contains the standard BizTalk assembly list)
- BindingSchema.xsd (contains the schema information for binding files)
I've added those two files to the BizTalkInstaller as Embedded Resource, so there's no need to include those files in your Setup Project. You, however, still need to include BTSIAssemblyOrder.dll in your Setup Project.Note: altering binding files before deployment should be used with caution, as you have full control of each aspect of the binding file.UPDATED: NEW DOWNLOAD LOCATION
The Custom Action library can be downloaded here
As always, full sourcecode is included and feedback is very welcomed!