There is a class library whose class is marked as ComVisible. This class uses Oracle.ManagedDataAccess, which in the form of a dll lies next to the dll of my class library.
When using this code
Assembly asm = Assembly.LoadFile(pathToAssembly); RegistrationServices regAsm = new RegistrationServices(); bool bResult = regAsm.RegisterAssembly(asm, AssemblyRegistrationFlags.SetCodeBase); Get FileNotFoundException
{"ΠΠ΅ ΡΠ΄Π°Π»ΠΎΡΡ Π·Π°Π³ΡΡΠ·ΠΈΡΡ ΡΠ°ΠΉΠ» ΠΈΠ»ΠΈ ΡΠ±ΠΎΡΠΊΡ \"Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342\" Π»ΠΈΠ±ΠΎ ΠΎΠ΄Π½Ρ ΠΈΠ· ΠΈΡ
Π·Π°Π²ΠΈΡΠΈΠΌΠΎΡΡΠ΅ΠΉ. ΠΠ΅ ΡΠ΄Π°Π΅ΡΡΡ Π½Π°ΠΉΡΠΈ ΡΠΊΠ°Π·Π°Π½Π½ΡΠΉ ΡΠ°ΠΉΠ».":"Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342"} Fyughen log shows that the assembly is searched in the directory of the caller. How can I indicate that the assembly should be looked for where they opened the assembly for registration? I understand that dependencies are loaded into the context of the caller, by default.