Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In BizTalk why is an MSI file both imported and installed?

I'm working on a BizTalk project and don't understand the reason for both installing (double-clicking) and importing (using biztalk admin console) is needed.

I have a BizTalk project and I added bindings to it's resources and exported an msi file. Now I want to install the application on another server.

As far as I can tell this is what an MSI install does:

  1. Copies files to the file system
  2. Registers assemblies into the GAC
  3. Adds the Application to the Add/Remove programs applet

However, here are my issues:

  1. Installing using the msi doesn't add the application to the Biztalk admin console. We need to import the msi.
  2. Uninstalling using the msi doesn't remove the assemblies from the GAC. It only removes the files it copied to the file system. Is there away for the uninstall to remove the GAC assemblies as well?
  3. If I just import the MSI I'm able to start my biztalk application and it seems to run fine. Combined with issue #1 and #2 why is the MSI needed at all? I can see just importing doesn't add it to the GAC so if other applications depend on it they won't work.

I'm sure I'm missing features/configuration that the msi provides, but could someone help me understand why the msi needs to both be installed and imported into biztalk and why when you uninistall it does not fully uninstall everything it installed?

like image 222
dtc Avatar asked Feb 05 '11 00:02

dtc


People also ask

What is MSI file in BizTalk?

msi file contains an artifact that already exists in the application, the import operation will fail and roll back. Certain types of artifacts in a BizTalk application or group must be unique.

What is MSI installation file?

MSI file extension stands for Microsoft Software Installer. It is a Windows Installer format that uses Microsoft's Windows Installer service to configure installer packages, such as Windows applications or update packages. The MSI file extension is used to install software on Windows operating systems.

Where are MSI files installed?

msi file is stored in the Windows Installer cache. Every update to the product such as a hotfix, a cumulative update, or a service pack setup, also stores the relevant . msp or . msi file in the Windows Installer cache.

What is the use of MSI file?

MSI is a file extension that applies to database files used by the Microsoft Windows Installer (MSI). They contain information about an application divided into features and components, and every component may contain files, registry data, shortcuts, and so on.


1 Answers

Two operations need to be undertaken when deploying a BizTalk solution.

Why Deploying BizTalk Solutions is a Two-Step Operations?

  1. Register the BizTalk Solution to the BizTalk Management Database
  2. Install the BizTalk Artefacts and Dependencies to the File System

First, BizTalk assemblies that comprise your solution must be registered to the BizTalk Management Database. This will allow BizTalk to know what Schemas, Maps, Pipelines and Orchestrations are available.

This is done by Importing your Windows Installer package to BizTalk.

Please, remember that a typical BizTalk plaform usually consists of many physical servers. However, all the servers in the BizTalk Group share a single BizTalk Management Database.

Therefore, the import operation needs to be done once for the whole BizTalk Group.

Second, the BizTalk assemblies that have been registered to BizTalk need to physically exist somewhere. Therefore, they must be installed to the file system.

This is done by double-clicking the Windows Installer package.

Notice that the install operation needs to be repeated on any physical server that is part of the BizTalk Group. And since, there is only one definition in the BizTalk Management Database as to what assemblies are part of the solution, this explains why BizTalk assemblies must be installed to the Global Assembly Cache (GAC).

Notice that, so far, the rule is simple :

  • BizTalk assemblies must be installed in the GAC on each server in the BizTalk Group
  • BizTalk assemblies must be imported (or registered) in the BizTalk Management Database once

However, we have only dealt with BizTalk assemblies. All other assemblies or other dependencies (Business Rules definitions, COM objects, bindings, configuration files, etc.) that a BizTalk solution needs at runtime are not covered by this two-step operation.

Inter-Environment Deployment

However, when the solution runs, those dependencies must also be present on each BizTalk server as appropriate.

That is why most of those artefacts are also registered to the BizTalk Management Database. But this time, this is only done so that the dependencies are brought in when the Windows Installer package for a BizTalk solution is created, and so that those dependencies can be installed appropriately on the target servers.

Why BizTalk Assemblies are Not Removed from the GAC upon Uninstall?

As a general rule of thumb, assemblies that are registered to the Global Assembly Cache are considered shared resources. Therefore, for safety reasons, BizTalk assemblies are not removed from the GAC upon uninstall. Consider what would happen when a custom BizTalk pipeline is used by more than one application. In that case, the BizTalk pipeline must be part of a separate, common, BizTalk application. Uninstalling this shared BizTalk application would break all other applications that depend on this pipeline...

When adding resources to the BizTalk Management Database, you have the choice to have assemblies be installed to the GAC at import or at install time. I strongly recommend against using the "GacOnImport" feature, that does not make sense in most typical multi-server BizTalk Groups.

However, there is an easier and most flexible way to customize what can be done to BizTalk assemblies or other dependencies, with regards to the Windows Installer package. This is done with Pre Processing and Post Processing Scripts.

Those scripts allow for running arbitrary applications at four specific times during the import/installation operations.

  • Before Importing
  • After Importing
  • Before Installing
  • After Intalling

If you want assemblies to be removed from the GAC upon uninstall, it is a simple matter of scheduling the appropriate command-line during the "Before Installing" phase of the operation.

like image 119
Maxime Labelle Avatar answered Oct 09 '22 00:10

Maxime Labelle