Alois Kraus
blog
Site Sections
Home
Contact
Syndication
Login
Posts
69
Comments
233
Trackbacks
162
<< Extend the Enterprise Library Config Tool - A Configurable Assembly Loader
|
Home
|
Store your App.Config inside SQL Server >>
Assembly.LoadFrom demystified
Rules are meant to be bro.. ahem expanded. Especially if everybody tells you not to do so ;-). The
Assembly Loader Rules
are for example a very strict set of rules. One rule of the loader is that you cannot load assemblies from directories above the directory where the executable is located. This can cause some headaches if you want to share some assemblies across applications which are not installed inside the GAC. You can bypass this restriction by using
Assembly.LoadFrom
. A very good article about the how and when of
Assembly.LoadFrom
can be found at
GotDotNet
. If you have to deal with plugin architectures and loosely coupled components you will soon end up in a situation where you need to expand the default assembly loader rules. You can configure the loader to some extent via your App.Config file but you cannot configure a
probing path
for directories above your application binary location. Lets suppose you have an application lets call it App.exe which references ClassLibrary1.Dll which in turn references ClassLibrary2.dll. Now you have to call Assembly.LoadFrom for ClassLibrary1.dll for some reason (e.g. it is a configured plugin). I have drawn the dependencies in the diagram below
Show More ....
Share This Post:
posted on Tuesday, April 04, 2006 9:39 PM
Print
Comments
No comments posted yet.
Post Comment
Title
*
Name
*
Email
Url
Comment
*
Remember Me?
Enter the code shown above
Article Categories
Patterns and Practices
C# Programing
Archives
December, 2011 (3)
September, 2011 (1)
August, 2011 (4)
July, 2011 (1)
June, 2011 (2)
March, 2011 (1)
November, 2010 (1)
July, 2010 (3)
June, 2010 (5)
May, 2010 (2)
April, 2010 (1)
March, 2010 (2)
February, 2010 (1)
December, 2009 (1)
November, 2009 (1)
October, 2009 (2)
September, 2009 (1)
June, 2009 (1)
May, 2009 (2)
December, 2008 (3)
November, 2008 (1)
May, 2008 (1)
April, 2008 (2)
January, 2008 (1)
November, 2007 (1)
February, 2007 (1)
January, 2007 (1)
October, 2006 (1)
September, 2006 (1)
August, 2006 (1)
July, 2006 (1)
June, 2006 (2)
May, 2006 (4)
April, 2006 (3)
March, 2006 (1)
February, 2006 (3)
January, 2006 (3)
December, 2005 (2)
November, 2005 (1)
Post Categories
General C# Programming
Enterprise Library
Physics
Non Work
F#
Performance
Image Galleries
Enterprise Library
C#
Personal
Programming
Rico Mariani: CLR Performance Guru
Copyright © 2005 Alois Kraus
This work is licensed under a
Creative Commons License