As a continuation of my previous question.
I load DLL through this code. Example 1:
var assembly = Assembly.LoadFile("C:\\Temp\\PROCESSOR\\SKM.dll");
And that's work fine.
But I use serialization that internally use this code, example 2:
var ass1 = Assembly.Load("SKM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null");
And this code throws an exception: System.Runtime.Serialization.SerializationException: Unable to find assembly "SKM, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null". - that's because the DLL in a separate folder.
How to force CLR to see DLL in separate directory (not in subfolders of main application)?
I tried this:
- <codeBase version="1.0.0.0" href="C:\\Temp\\PROCESSOR\\SKM.dll"/>- do not work because it works only for subfolders.
- <probing privatePath="paths"/>- do not work because it works only for subfolders.
- First run first example, and then run second example. But even if the SKM.dllalready loaded, CLR does not see my assembly.
 
     
    