Problem:
1. We need to follow Plugin Architecture. i.e Loading Asseblies at runtime dynamically
2. An assembly that an application must use at runtime is present in some folder on the system, and has to be loaded at runtime.
Solution:
We can use a combination of AssemblyResolve event, Assembly.Load and .Net Reflection.
Please follow the links below for a complete understanding of HOW !
ref:
Assembly.LoadFile versus Assembly.LoadFrom - .NET obscurity at its finest by Josh Fischer -http://www.codeproject.com/KB/dotnet/AssemblyLoadFile.aspx
Haibo Luo's weblog - http://blogs.msdn.com/haibo_luo/archive/2005/11/17/494009.aspx
Loading and Unloading an Assembly at Runtime -http://www.codeproject.com/KB/cs/Assemblies___Appdomains.aspx
How the Runtime Locates Assemblies - http://msdn.microsoft.com/en-us/library/yx7xezcf.aspx
Loading assemblies (references) during runtime - http://www.danielahill.com/post/Loading-assemblies-(references)-during-runtime.aspx
How to: Load Assemblies into an Application Domain -
http://msdn.microsoft.com/en-us/library/25y1ya39.aspx
StackOverflow.com Articles -
http://stackoverflow.com/questions/465488/c-load-assemblies-at-runtime
http://stackoverflow.com/questions/468243/c-load-assemblies-at-runtime-again