Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiple Projects app.config
Message
From
30/06/2011 04:09:15
 
 
To
29/06/2011 17:24:15
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 3.0
Miscellaneous
Thread ID:
01516771
Message ID:
01516828
Views:
36
>I'm splitting a large project into several smaller projects in the some solution
>I note that the app.config is associated with a project.
>All tasks begin at one project - others are called based on menu selections
>What's the best way to handle the app.config?

As Bonnie states you only need the one app.config file at the EXE level. In fact any other app.config file that exists in a DLL project is completely superflous - it's never used at runtime.

If you have app.config's in other projects they may have been automatically generated by, for example, one of the VS Data or WCF wizards to contain connection string info and suchlike. In that case you may need to copy/paste the relevant sections to the main app.config file so that they are available at runtime.
I've seen ideas for a few schemes which will enable access to DLL level app.confings at runtime but they tend, by neccessity, to be complex - usually a simple copy/paste as above is a one-off operation.

HTH,
Viv
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform