App settings magic?

B

Bob Altman

I have an application that consists of two projects, a main program and a
separate DLL assembly. The DLL contains an application-scoped setting,
which I access via something to the effect of My.Settings.SomeSetting.

Now, here is the mystery: I was under the impression that
application-scoped settings are stored in the .config file associated with
the application assembly. But Visual Studio doesn't copy the dll's config
file to the main application directory. The only files I see in the main
application directory are the application's exe, pdb, and config files plus
the dll and it's pdb file. And yet it works. When I call into the dll,
My.Settings.SomeSetting returns the value I've given it in the designer.

Where is this application-scoped setting stored? Is it somehow baked into
the dll? I chose to use the My.Settings magic because I thought I'd end up
with a text file that could be edited in the field if a customer needed to
change that setting. But I can't find the text file...

TIA - Bob
 
H

Harry

Bob Altman said:
I have an application that consists of two projects, a main program and a
separate DLL assembly. The DLL contains an application-scoped setting,
which I access via something to the effect of My.Settings.SomeSetting.

Now, here is the mystery: I was under the impression that
application-scoped settings are stored in the .config file associated with
the application assembly. But Visual Studio doesn't copy the dll's config
file to the main application directory. The only files I see in the main
application directory are the application's exe, pdb, and config files
plus the dll and it's pdb file. And yet it works. When I call into the
dll, My.Settings.SomeSetting returns the value I've given it in the
designer.

Where is this application-scoped setting stored? Is it somehow baked into
the dll? I chose to use the My.Settings magic because I thought I'd end
up with a text file that could be edited in the field if a customer needed
to change that setting. But I can't find the text file...

TIA - Bob
I was surprised to find that the settings are compiled into the dll. Have a
look at your dll in notepad, and you will find the settings.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top