HighTechTalks DotNet Forums  

Troubles with configuration files for application with severalseveral dll

Dotnet Framework microsoft.public.dotnet.framework


Discuss Troubles with configuration files for application with severalseveral dll in the Dotnet Framework forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
bz
 
Posts: n/a

Default Troubles with configuration files for application with severalseveral dll - 11-16-2007 , 10:10 AM






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

Reply With Quote
  #2  
Old   
Scott Roberts
 
Posts: n/a

Default Re: Troubles with configuration files for application with several several dll - 11-16-2007 , 10:30 AM






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


"bz" <bzamfir (AT) gmail (DOT) com> wrote

Quote:
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


Reply With Quote
  #3  
Old   
sloan
 
Posts: n/a

Default Re: Troubles with configuration files for application with several several dll - 11-16-2007 , 02:53 PM




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

This is a good helper article:
http://www.eggheadcafe.com/tutorials...-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.





"bz" <bzamfir (AT) gmail (DOT) com> wrote

Quote:
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



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.