Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multiple Projects app.config
Message
De
30/06/2011 04:09:15
 
 
À
29/06/2011 17:24:15
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 3.0
Divers
Thread ID:
01516771
Message ID:
01516828
Vues:
37
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform