Thanks Jan. Unfortunately, in this case it is an InstallShield .exe that
launches the .NET Installer class. Using
System.Reflection.Assembly.GetExecutingAssembly() returns me "MyClass.dll".
"Jan Tielens" <jan@no.spam.please.leadit.be> wrote in message
news:OP0%23aL3zDHA.540@tk2msftngp13.phx.gbl...
> By default the config file of the executing assembly is used, also if a
> dependent assemblie requests config file info. So lets say you have an exe
> (app.exe) that uses a dll (lib.dll), you should have only 1 config file:
> app.exe.config. Even if you want to retrieve settings from whitin the
> lib.dll, the .NET Framework will look in the app.exe.config file
(=executing
> assembly).
>
> --
> Greetz,
> Jan
> __________________________________
> Read my weblog:
http://weblogs.asp.net/jan > "Bob Willer" <bobw@nospam.liquidmatrix.com> schreef in bericht
> news:%23ep60izzDHA.2872@TK2MSFTNGP09.phx.gbl...
> > I have a .NET Installer class that gets executed during my installation.
> > However, that installer class is reliant on an associated .config file.
So
> I
> > have "MyClass.dll" that is a .NET Installer class. I also have a file
> > "MyClass.dll.config" that is deployed into the same destination
directory.
> >
> > By doing some testing and using reflection, I have confirmed that the
> > ExecutingAssembly is "MyClass.dll", and it is executing in the directory
> > where MyClass.dll.config lives. However, anytime I try to retrieve a
value
> > from the config file, (for example using
> ConfigurationSettings.AppSettings),
> > I get an error telling me the section does not exist.
> >
> > Does anybody have this working, or know of any issues or how to do this?
> >
> > Thanks,
> > Bob
> >
> >
> >
>
>