Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a nested Web.config file?

I tried adding a new web.config file to my asp.net app (I went through right click on the project -> add -> Web Configuration File).
However at the Solution Explorer the newly added file is not nested under Web.config. Any idea?
See image -
I would like Web.Staging.config to be nested just as Web.Release.config:
Solution Explorer
(Assume VS 2012 or 2013).

like image 730
Erez Cohen Avatar asked Apr 01 '14 11:04

Erez Cohen


Video Answer


1 Answers

If all you want is nesting, you could just open your csproj file in a text editor and change this:

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

to this:

<None Include="Web.Staging.config">
  <DependentUpon>Web.config</DependentUpon>
</None>
like image 88
Marcus Avatar answered Sep 17 '22 11:09

Marcus