I have a C# .dll that is referenced in a LabView application. I need the .dll to gain access to an App.config file. (So that we can use log4Net within the .dll for debugging purposes)
The problem is the entry point for this C# .dll is a LabView app and not a .NET app and as a result no "DOT_NET_APP.exe.config" exists for this .dll
I've tried "LABVIEW_APP.exe.config" just to see if it COULD log and I get nothing. No log files are created. I've also tested to ensure that the log4Net configuration is correct. (Created a dummy .net console app and tested the C# .dll)
Is there a way for a .DLL to be explicitly told where to look for its configuration file? Can I override the default behavior that causes it to look for "DOT_NET_APP.exe.config" and provide my own?
use AppDomain.GetData()
with the "APP_CONFIG_FILE"
parameter to find the location of your config file.