The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

import-bot (20211) [Avatar] Offline
#1
[Originally posted by zameerm]

Can we have a properties/configuration file associated with an assembly (class
library project).
Like in asp.net we have web.config and windows we have app.config.
I tried give one config file called app.config to my assembly project. But it
didn't work?
Can anyone help me.

Zameer
import-bot (20211) [Avatar] Offline
#2
Re: properties/configuration file with an assembly
[Originally posted by fgrimes]

Zameer,

When you use the DLL in an app, you need to place the necessary settings in
the app.exe.config. For example, in the Bank class in poker.dll, you'll see
the code:

connectString = ConfigurationSettings.AppSettings["dsn"];

When this DLL is used by WinPok (and ConPok) the setting is stored in the
appSettings section of WinPok.exe.config (and ConPok.exe.config).

Fergal