Could not load file or assembly Microsoft.Dexterity.Bridge.dll or one of its dependencies – Dynamics GP
When developing Dynamics GP addins, the above error can occur for a number of reasons. It generally means what it says, the referenced assembly is looking for a resource it can’t find on the available search locations. If this is encountered whist developing a Dynamics GP addin while attempting to run the addin as an application outside of GP (say in debug from Visual Studio), then this error may well be encountered. What the developer may find odd is that it will work when ran from GP as an addin. Why is this so?
The “bridge dll” is the eventing route between GP and .NET applications (including addins) but it has other dependencies from the dexterity shared components. These are required to be present on the standard system environment paths searched when looking for dlls (search online for dll dependency search paths for more info).
When the addin is ran normally, as an addin by the Dynamics GP process, the dependencies are provided by Dynamics GP process, from the process’s application folder. When running a free standing GP app, from the debug folder of Visual Studio, then the dependencies must be made available to the application through putting the dlls in the .net application’s folder (or other path that will be searched).
By placing TNTLIB.dll and DDAPI.dll into the bin folder should solve the problem. Strictly speaking xdll32.dll and Bidi32.dll should be included too (search online for stand alone Dexterity applications). In Visual Studio this can be achieved consistently by including the files in the project and setting them to copy to output. However it may be preferable to only do this for debug builds, that should be possible with Visual Studio post build steps or manually.
The following are the files that should be included if running stand alone.
|Tntlib.dll||Library used by other dlls and executables|
|Ddapi.dll||Data Dictionary API –provides access to Dexterity dictionaries|
|Bidi32.dll||Additional dependency for dexterity (My guess is: BiDirectional Convert Ansi To Oem code page, I think it converts extended languages that go left to right and right to left to oem code page characters and back again)|
|Xdll32.dll||Dex gateway to other 32bit dlls|
Just as a reminder, we should already be familiar with the usual .NET dlls required for .NET addins that would normally be referenced:
|Microsoft.Dexterity.Shell.dll||.NET managed shell|
|Microsoft.Dynamics.Framework. UI.Navigation.dll||.NET navigation|
|Microsoft.Dynamics.Framework. UI.WinForms.Controls.dll||.NET windows controls.|
Please comment if you found this useful – motivates me to keep blogging…