johnc
johnc

Reputation: 40223

C# App.Config location

I have a solution with 10 or so projects in it, and have started having issues with SystemConfiguration returning empty configuration instead of locating my App.Config file.

Should I have multiple App.Configs, one for each project (I am assuming and hoping not), if not, where is the best place for it to be located in my projects?

Upvotes: 0

Views: 2085

Answers (2)

cgreeno
cgreeno

Reputation: 32401

You could use build events to overwrite all app.configs with a common one stored in a "main" project or location

Upvotes: 1

Otávio Décio
Otávio Décio

Reputation: 74290

Choose one of the projects as the one responsible for maintaining the App.config file. Then for the other projects, use "Add existing item" , navigate to the App.config file and click on the "Add as a link" (it is the right side of the Add button).

Upvotes: 3

Related Questions