views:

18

answers:

2

Hi there,

We have a DotNetNuke application for which we build a number of modules and lately it seems a specific problem keeps coming up.

  1. The modules we build make use of a third party DLL from Telerik.
  2. Some of the older modules use the DLL that targets .net 2.0 whilst others use the DLL that targets .net 3.5
  3. We now get conflicts with the older modules, because we loaded the 3.5 DLL into the bin directory of the website and this obviously happens because previous modules were built against the previous DLL.

What we can't afford to do is to go back to all the previous modules and update those projects and rebuild them every time we have a slight DLL difference, because ultimately the two versions of the DLL do the exact same thing.

Is it possible to remove the version information from the reference in a project so that it will automatically assume to use whatever version is available in the project within which it is being used?

Regards, Jacques

A: 

it's not possible to remove version information from reference. Instead of that, you can use BindingRedirect in web.config. Basically as it's name suggest is a reference redirector and when your 2.0 modules search for telerik dll version that is of some older number, you can redirect it to newer version.

This will work only if everything except the version number in dll is different

lakhlaniprashant.blogspot.com
+1  A: 

This can be achieved by using Assembly Binding Redirection. Basically, you create a configuration section in Web.config, that basically says: "When requesting these versions of an assembly, use this specific version".

driis