How to use ConfigurationManager for DEBUG and RELEASE versions in VS 2008 projects

I would like to use the "ConfigurationManager" settings that I can create in VS 2008 (see image) to create different types of behavior in my web.config or app.config files ... for example, I want to use different connection strings if active "debugging" -configuration, for example:

<configuration>
   <connectionStrings configSource="connectionStrings.config.$(ConfigurationName)"/>
</configuration>

alt text

Any suggestions on how to do this? (Or maybe different than that?)

thanks

+3
source share

Source: https://habr.com/ru/post/1715871/


All Articles