I am developing an application which references and uses some third party assemblies from a certain Vendor; in development box I have these 3 assemblies in a reference folde
Use SN.exe : SN -T VendorAssembly.dll, this will return a hex number that is the public key token, then, reference the assembly from app.config. To get the version right click your vendor assembly and use that for the codeBase version value, the href=path you mentioned.
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="VendorAssembly" culture="neutral" publicKeyToken="307041694a995978"/>
<codeBase version="1.1.1.1" href="FILE://D:/ProgramFiles/VendorName/ProductName/Support/API/Bin64/VendorAssembly.dll"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
You should first find the folder where theses dlls are installed then use AppDomain.AssemblyResolve to hook assembly resolution and try to load the requested assemblies from this folder.
It will look something like this (not tested, and you need to check what args.Name
contain exactly, could contain the version and the strong name along with type name) :
var otherCompanyDlls = new DirectoryInfo(companyFolder).GetFiles("*.dll");
AppDomain.CurrentDomain.AssemblyResolve += (sender, args) =>
{
var dll = otherCompanyDlls.FirstOrDefault(fi => fi.Name == args.Name);
if (dll == null)
{
return null;
}
return Assembly.Load(dll.FullName);
};