Question:
In dll
I write the following code:
var path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Config\Settings.xml");
AppDomain.CurrentDomain.BaseDirectory
returns the path of who loaded the dll
, i.e. to the .exe
file.
How can I get the path where the dll
is located, and not the path of the one who called this dll
?
Answer:
Found
Assembly.GetExecutingAssembly().Location