J
José Joye
Hello,
I have an assembly that is used by a VB6 application. This application can
be a normal exe or an ActiveX (called through CCW).
My assembly needs to get extra info from a config file. In order to hide it
from the VB client, I want to link the config file to my assembly and not to
the applicaction. In that sense, the config file will be called
<myAssemblyName>.dll.config and will be located in the same directory as my
assembly dll.
I tried to use the
"AppDomain.CurrentDomain.SetupInformation.ConfigurationFile" property to
amend the config file to be used. However, it does not work (According to
documentation: This property cannot be changed after the AppDomain has
finished its first bind)
My problem is that my assembly makes use of
"ConfigurationSettings.AppSettings[strKey]" to blindly get keys from the
configuration file and I can not really modify the part of the code that
retrieve info from the config file. Furtermore, I also use the config file
to get info about switches and listener
Is there a way to force my assembly to use a custom config file?
Thanks,
José
I have an assembly that is used by a VB6 application. This application can
be a normal exe or an ActiveX (called through CCW).
My assembly needs to get extra info from a config file. In order to hide it
from the VB client, I want to link the config file to my assembly and not to
the applicaction. In that sense, the config file will be called
<myAssemblyName>.dll.config and will be located in the same directory as my
assembly dll.
I tried to use the
"AppDomain.CurrentDomain.SetupInformation.ConfigurationFile" property to
amend the config file to be used. However, it does not work (According to
documentation: This property cannot be changed after the AppDomain has
finished its first bind)
My problem is that my assembly makes use of
"ConfigurationSettings.AppSettings[strKey]" to blindly get keys from the
configuration file and I can not really modify the part of the code that
retrieve info from the config file. Furtermore, I also use the config file
to get info about switches and listener
Is there a way to force my assembly to use a custom config file?
Thanks,
José