Could not load file or assembly ''Rebex.Networking, Version=5.0.7390.0

0 votes
asked Aug 19 by ITM (140 points)

One of our customers just reported the following error when trying to use the SFTP module in our application:

System.IO.FileLoadException: Could not load file or assembly ''Rebex.Networking, Version=5.0.7390.0, Culture=neutral, PublicKeyToken=1c4638788972655d'' or one of its dependencies. The located assembly''s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) File name: ''Rebex.Networking, Version=5.0.7390.0, Culture=neutral, PublicKeyToken=1c4638788972655d''

We tried using copying over the relevant dlls in versions 7390, 7450 and 7501, but each time we get an error specifying a different version that cannot be loaded.

We use both the File Transfer and Email components from Rebex. We do not know if the email components are throwing the same exception.

This was previously working and the only change made was to purchase the email pack separately. Do the versions of all components need to be the same?

1 Answer

0 votes
answered Aug 19 by Lukas Pokorny (113,730 points)

Yes, basically the versions of all components need to be the same.

So if your application references a specific version of Rebex assemblies, customers writing modules for it that also use Rebex assemblies should use that same version. (Although there are various workarounds for this limitation, for example merging Rebex assemblies with other application's assemblies into an independent new DLL.)

In scenarios that don't involve customers writing their own plugins, the recommended solution is to make sure all references to Rebex assemblies in all of the application’s modules reference the same Rebex assembly version (preferably 5.0.7501.0) and recompiling the application and its modules.

If this cannot be done for some reason, and all modules reference recent versions of Rebex assemblies, redirecting the bindings in application’s config should also work (unless the different versions are too different and separated by many years). However, this should be considered a solution of last resort.

...