You can try the following approach:
<ItemGroup> <None Include="App.config"/> </ItemGroup>
<ItemGroup Condition=" '$(Configuration)' == 'Debug' "> <None Include="App.Debug.config"/> </ItemGroup> <ItemGroup Condition=" '$(Configuration)' == 'Release' "> <None Include="App.Release.config"/> </ItemGroup>
I have not tried this approach to app.config
files, but it worked fine with other items of Visual Studio projects. You can customize the build process in almost any way you like. Anyway, let me know the result.