views:

288

answers:

1

Hi

I am just wondering in VS2010 the web.config is broken up into

web.config
web.debug.config
web.release.config

So from what I gathered is the web.config is just like the master template. So I am guessing in my debug I could put things like my local database where in my release one I would put my server database.

Now how does it know when to use the release version or debug version?

I also here that you can have more than 2. How does that work?

A: 

VS will use the debug version if you publish/run with the Debug configuration, and will use the Release version if you publish/run with the Release configuration. Also, if you add more build configurations, you can have web.config versions for each of those build configurations as well.

Jeff Schumacher
How do you make more build configurations?
chobo2
Right-click your solution, select Configuration Manager. Select "New" from the Active solution configuration, use Debug or Release to copy from, give it a name. Once you've done this, you can manually add Web.[ConfigName].config or right click web.config again and select "Add Config Transforms".
Jeff Schumacher