Troubles with configuration files for application with severalseveral dll

B

bz

Hi,

I have an application that consists in one main exe and several dll's
(BL, DAL, Util, etc)
Each dll project has its own settings (in Properties\Settings.settings
file).
When I build the solution, in the bin folder of each project it VS
generates the mylib.dll and mylib.dll.config files
However, the config files are not copied over to the exe bin filder.
There I only see myapp.exe and myapp.exe.config, and mylib1.dll and
mylib2.dll, and no mylib1.dll.config and mylib2.dll.config

Am I doing something wrong? I thought the dll config's should be
copied there too, since for example if I want to test the app from
there, the dll's need the config files, isn't it?
Do I have to copy the configs manually?

Thanks
 
S

Scott Roberts

I believe that an application has only one config file. All loaded
Assemblies use the config file of the application (by default).
 
S

sloan

You'll need a post build event...on non app.config type files.

This is a good helper article:
http://www.eggheadcafe.com/tutorial...180-c1f564b41f85/some-aspnet-20-configur.aspx

As one example (this will make sense after you read the article)

I have to setup a post build event on my "ExternalConnectionStrings.config"
file, when I do anything type of project outside of a web app.
(The web app doesn't run from some /bin/ directory, thus a post build event
isn't needed).

But Peter's very good article should show you some options.
 

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