D
Damien Sawyer
Hi all,
I'm using a referencing a VB.net dll from a C# application. I wish to use an
app.config file associated with the DLL (so that it can be configured once
for all applications which call the dll). The problem is, when I run the
function below (inside the dll) it gives an error saying that the reference
cannot be found. AppSettingsReader.GetValue is undesirably looking for the
information inside the config file associated with the calling assembly.
Can someone please let me know the best way to get around this?
Thanks in advance.
Damien Sawyer
Function sINIFileConfigurationValue(ByVal sKey As String) As String
' Note - this returns values from the app.config file of the assembly
which is calling this DLL, not from the app.config file associated
with this DLL's assembly
Dim oConfigs As New System.Configuration.AppSettingsReader
Return oConfigs.GetValue(sKey, GetType(System.String))
End Function
I'm using a referencing a VB.net dll from a C# application. I wish to use an
app.config file associated with the DLL (so that it can be configured once
for all applications which call the dll). The problem is, when I run the
function below (inside the dll) it gives an error saying that the reference
cannot be found. AppSettingsReader.GetValue is undesirably looking for the
information inside the config file associated with the calling assembly.
Can someone please let me know the best way to get around this?
Thanks in advance.
Damien Sawyer
Function sINIFileConfigurationValue(ByVal sKey As String) As String
' Note - this returns values from the app.config file of the assembly
which is calling this DLL, not from the app.config file associated
with this DLL's assembly
Dim oConfigs As New System.Configuration.AppSettingsReader
Return oConfigs.GetValue(sKey, GetType(System.String))
End Function