This is a mirror of official site: http://jasper-net.blogspot.com/

How to overcome the CLR fusion limitation

| Monday, January 10, 2011
There are cases where you would be interested to load an assembly from a different directory then the root dir of your .net application. When you’ll try to do so you will face with the limitation of the fusion process (assembly loading process) – this limitation limits you to load assemblies from underneath the root dir of your application in order to guard your app from dll hell.

In order to overcome this limitation you can use the old plain Unix trick… create a symbolic link to the file… there is a small utility called mklink which lets you create symbolic link to a directory or a file.The process of making it work is to put the assembly in directory of your choice and then create the symlink at the place where the assembly is being expected to be.Its possible later on to replace the symlink with other symlink thus redirect the app to a different assembly without changing the app itself.

If you are interested in redirecting a bunch of assemblies it is also possible to declare a probing directory via the app.config file and create a symbolic link of this directory thus redirecting all the probing calls to a different directory outside of the root path of the app.

Read more: Ohad's Blog

Posted via email from .NET Info

0 comments: