Closed thomasjoscht closed 7 years ago
I've adjusted the AssemblyHelper a little bit. Now the old mechanismn with Type.GetType(assemblyQualifiedName)
will be used first. In case it doesn't work the .NET 4+ specific method with custom assembly resolver will be used. Also throwOnError is set to false. This should work in all old environments. This works now also in my environment f.e. for Npgsql without any configuration in app.config, without direct dependency to lib and without assembly must be lied in same directory as application. Can you confirm this?
Thanks- will try in a day or 2...
Currently loading external DbProviderFactory in GetFactory() implementation is based on Type.GetType(...). this will fail (in my case) everytime returning null. This can also be reproduced trying Type.GetType() directly after AppDomain.CurrentDomain.Load(...) which will return everytime null.
My implementation uses a simple AssemblyLoader as static helper class. It uses Type.GetType overloading with AssemblyResolver function. NOTE: This is only possible in .NET 4+. Therefore a new build constant was necessary.
EDIT: I see test case TestRepository has failed because of FileNotFoundException of direct referenced System.Data.SQlite. In my case the assemblies aren't referenced directly. Perhaps turning throwOnError to false of GetType could solve this.
EDIT2: I've tested locally with a direct referenced db provider which works in my case without throwing a FileNotFoundException or so on.