1) You are NOT allowed to redistribute Dimensions components with your applications. This means your application is dependent on the version that is installed on the client's machine.
2) Dimensions components are "strong named" (installed in the GAC) which means your application is hard-coded to use the component versions that you used when you compiled your application.
Long ago, we had to deal with DLL Hell. We could just instantiate MDMLib and not worry about the version. This was good and bad (mostly bad). With strong named components, you must specify the version you want to instantiate.
For example, let's say you build an application which has a reference to MDMLib.dll and you compiled your application on Dimensions 4.5. On 4.5, the component version for MDMLib.dll is 2.119.2.0.
This means your application will work on any Dimensions version as long as MDMLib.dll still has a version of 2.119.2.0. The MDMLib.dll version changed on Dimensions 5.6 so your application will fail.
There are two solutions to the problem:
1) Re-compile your application on the new version of Dimensions. This is a pain because then you have multiple install kits (one for each version of Dimensions you want to support).
2) Use the application configuration file to redirect component versions. This is what I've done in my applications. It does NOT require re-compiling your application. It just requires a modification to the application configuration file.
For #2...
In Visual Studio, add an Application Configuration File to your project. It will (by default) be called "app.config". I've made the following change to the configuration file which will redirect version 2.119.2.0 to 2.122.2.0 for MDMLib.dll. This will make the application work on 5.6 without having to recompile. You can do this for multiple .dll's if you need to.
- Code: Select all
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MDMLib" culture="neutral" publicKeyToken="8174058f62942e31"/>
<bindingRedirect oldVersion="2.119.2.0" newVersion="2.122.2.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
When you compile and install your application, the "app.config" file will be automatically renamed to "<application_name>.exe.config". You can make changes to this file at any time without having to recompile.
Best,
Jamey
