.NET Download assembly from <probing privatePath ...> attr to .config file

I have an application that loads most of its DLL from a subfolder specified in the configuration file (myapp.exe.config) in the attribute

<probing privatePath="subdir"/> 

My question is: can I load dll (say mydll.dll) at runtime using only its file name if it lives in the same subdir specified in the research path?

I tried Assembly.LoadFile("mydll.dll"), but it will not search in "subdir".

+3
source share
2 answers

You do not need to load the DLL file, just use Type.GetType (typeName) to get your type, and then use this type for an instance of your object

+1
source

. dll , .net , . Assembly.Load, , , DLL , , , , .net - 6 LAN ?

+4

Source: https://habr.com/ru/post/1725432/


All Articles