How to add an attached Web.config file?

I tried to add a new web.config file to my asp.net application (I went through a right click on the project -> add -> Network configuration file).
However, in Solution Explorer, the newly added file is not attached to Web.config. Any idea?
See Image -
I would like Web.Staging.config to be nested in the same way as Web.Release.config:
Solution explorer
(Assume VS 2012 or 2013).

+7
source share
3 answers

Take a look at this blog .

In particular:

To add a configuration configuration file (for example, Web.Staging.Config), you can right-click the source web.config file and click the "Add configuration transformations" context menu command

+7
source

If all you need is nesting, you can simply open your csproj file in a text editor and change this:

<None Include="Web.Staging.config" /> 

:

 <None Include="Web.Staging.config"> <DependentUpon>Web.config</DependentUpon> </None> 
+18
source
0
source

All Articles