To use multiple DLLs with the same name in different applications without causing conflicts, you can consider the following approaches:
- Separate Application Pools: If you're hosting your applications on IIS, you can configure each application to run in its own application pool. This way, each application can have its own set of assemblies, and they won't interfere with one another.
- Use Different Directories: Place the newer version of the DLL in a separate directory specific to the application that requires it. You can then modify the application's configuration file (e.g.,
web.config) to include a<probing>element that points to the specific directory where the newer DLL is located. However, as you mentioned that probing did not work for you, ensure that the path is correctly specified and that the application is configured to look in that directory first. - Assembly Binding Redirects: If you have control over the applications, you can use assembly binding redirects in the
web.configfile. This allows you to specify which version of the DLL to load at runtime, but this may not work if the newer DLL is not backwards-compatible. - Shadow Copying: Enable shadow copying for your applications. This allows the application to load assemblies from a temporary location rather than the bin directory, which can help avoid conflicts.
- Use Strong Naming: If you have the ability to modify the newer DLLs, consider strong naming them. This creates a unique identity for the assembly, allowing you to have multiple versions of the same DLL in the GAC (Global Assembly Cache) or in different directories without conflict.
By implementing one or a combination of these strategies, you should be able to run multiple applications that require different versions of the same DLL without issues.