Connecting .NET applications in a multiple installation environment
By default, applications use the .NET assemblies from the primary installation. If there is no primary installation, or you do not want to use the primary installation assemblies, you must update the application configuration file, or the DEVPATH environment variable.
- You do not have a primary installation.
- You do not want the application to use the primary installation assemblies.
- The primary installation is a lower version of IBM® MQ than the version that the application was compiled with.
- You want your application to use the assemblies from a non-primary installation, but the primary installation is at the same version as the non-primary installation.
Connecting .NET applications using the application configuration file
Within the application configuration file, you must set various tags to redirect applications to use assemblies that are not from the primary installation.
Applications compiled with an earlier version of IBM MQ | Applications compiled with a later version of IBM MQ | |
---|---|---|
To run an application with a later version IBM MQ primary installation. (later version assemblies in GAC): | No changes necessary | No changes necessary |
To run an application with an earlier version IBM MQ primary installation. (earlier version assemblies in GAC): | No changes necessary | In the application configuration file:
|
To run an application with a later version of IBM MQ non-primary installation. (later version assemblies in installation folder): | In the application configuration file:
|
In the application configuration file:
|
To run an application with an earlier version of IBM MQ non-primary installation. (earlier version assemblies in installation folder): | In the application configuration file:
|
In the application configuration file:
|
A sample application configuration file NonPrimaryRedirect.config is shipped in the folder
. This file can be modified with the IBM MQ installation path of any non-primary installation. The file can also be directly included in other configuration files using the <linkedConfiguration> tag. Samples are provided for nmqsget.exe.config and nmqsput.exe.config. Both samples use the <linkedConfiguration> tag and include the NonPrimaryRedirect.config file.
MQ_INSTALLATION_PATH
\tools\dotnet\samples\base
Connecting .NET applications using DEVPATH
You can find the assemblies using the DEVPATH environment variable. The assemblies specified by the DEVPATH variable are used in preference to any assemblies in the GAC. See the appropriate Microsoft documentation on DEVPATH for more information about when to use this variable.
<configuration>
<runtime>
<developmentMode developerInstallation="true"/>
</runtime>
</configuration>