Assembly Installation in the GAC
Each computer contains a global assembly cache (GAC) that contains the assemblies that are used by one or more applications on that computer. For BizTalk Server to process messages during run time, the assemblies included in a BizTalk application must be present in the GACs of the computers that run the application.
If your application is isolated to one server, then assemblies need only be present in the GAC of that server. However if multiple servers host the application, then the assemblies in that application must exist in the GAC of each computer that requires access to the artifacts contained in the assembly. For example, if you deploy Assembly_A to Server_1, and then enlist Assembly_A in a host on Server_2, Assembly_A must be installed in the GAC on Server_2. If it is not, Server_2 will not be able to access Assembly_A during run time.
In particular, assemblies containing orchestrations and any assemblies that they depend on must always be installed in the GAC on servers that run instances of the host to which the orchestration is bound. In addition, assemblies containing the maps and pipelines used by a port must be installed on servers that run instances of the host serving as the adapter handler for the port.
You can specify a deployment option for each assembly to install it in the GAC when you deploy the assembly from Visual Studio. Alternatively, you can install an assembly in the GAC manually. In addition, you can specify deployment options to install the assembly in the GAC after it is deployed into a BizTalk application.
The following summarizes the tools and methods available to install an assembly in the GAC:
Microsoft Visual Studio. As previously mentioned, you can set project properties to install assemblies in the GAC automatically when you deploy them, as described in How to Set Deployment Properties in Visual Studio. You can also manually install assemblies in the GAC by using the Gacutil command-line tool included with Visual Studio, as described in How to Install an Assembly in the GAC.
BTSTask command-line tool. When you add an assembly to a BizTalk application by using BTSTask, you can specify options to install the assembly in the GAC when the application that contains it is imported or installed. For more information, see AddResource Command: BizTalk Assembly. Also see AddResource Command: .NET Assembly.
BizTalk Server Administration console. In the same manner as BTSTask, when you add an assembly to an application by using the Administration console, you can specify options to install an assembly in the GAC when the application that contains it is imported or installed. For more information, see How to Add a BizTalk Assembly to an Application. Also see How to Add a .NET Assembly to an Application.
In addition, you can configure deployment options at any time after an assembly has been deployed into or added to an application, as described in How to Modify the Deployment Options of a BizTalk Assembly. When assemblies are deployed into Visual Studio from Visual Studio for the first time, the deployment options in the Administration console are set as follows: GAC on installation is enabled and GAC on import is disabled. If you make changes to these settings, your changes will still be in effect if the assembly is redeployed from Visual Studio.
Drag and drop. Using Windows Explorer, you can drag and drop the assembly file into the <Windows folder>\assembly.
Other methods. There are other tools and methods, including using Windows installer or tools created by third-party vendors, to install an assembly in the GAC.
So that your application functions properly, ensure that the same versions of assemblies are in the BizTalk Management database as in the GAC. If you do not always install an assembly in the GAC when you deploy it, you might have different versions in the GAC and the BizTalk Management database, which will cause processing errors during run time.
For information about version numbering, see "Assembly Versioning" in the .NET Framework help available from Microsoft Visual Studio. Note that the use of .NET policy files is not supported by BizTalk Server.