<p>I've got a relatively large .Net system that consists of a number of different applications. Rather than having lots of different app.config files, I would like to share a single configuration file between all the apps.</p>

<p>I would also like to have one version when developing on my machine, one version for someone else developing on their machine, one version for a test system and one version for a live system. </p>

<p>Is there an easy way of doing this? </p>

You could use a Post-build event (Properties -> Build Events) on your "child" projects to copy a config file from a master project to others, like this:
```
```
copy /Y c:\path\to\master\project\app.config $(TargetPath).config
exit 0
```
```
(The "exit 0" as the last line prevents a build error).
To have separate config files for different build targets ("RELEASE", "DEBUG", etc), you can edit the .csproj file (or .vbproj) in NOTEPAD.EXE to add an AppConfig tag for each of the target groups, like this:
```
```
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>.\bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <AppConfig>debug.app.config</AppConfig>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>.\bin\Devel\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <AppConfig>release.app.config</AppConfig>
  </PropertyGroup>
```
```
Notice the new
<AppConfig>
tags present in each group.