Web.Debug.config is NOT transforming the connectionstrings to the Web.config in MVC 5 projects

Out of the box, transformations (debug/release) are applied on publishing (deploy). Not on build, on deploy.

To make this happen on build you may need to do some manual edits of the project file. Take a look here fore example: https://gist.github.com/EdCharbeneau/9135216


So close but BACKWARDS. For this case use Web.config and Web.Release.config only.

Put all your Debug settings in Web.config, put your Release settings in Web.Release.config, and do not use Web.Debug.config. Debugging will happen using the regular Web.config, and only released builds will get the Release settings.

from your example above:

Web.config

<!-- test/debug settings in regular web.config -->
    <connectionStrings>
        <add name="Envy" connectionString="Data Source=10.10.10.10\MSSQLSERVER2014;Initial Catalog=myDB;user id=myLoginID;password=password" providerName="System.Data.SqlClient"/>
        <add name="EnvyIdentity" connectionString="Data Source=10.10.10.10\MSSQLSERVER2014;Initial Catalog=myDB;user id=myLoginID;password=password" providerName="System.Data.SqlClient"/>
        <add name="DNNSmartstore" connectionString="Data Source=10.10.10.10\MSSQLSERVER2014;Initial Catalog=myDB;user id=myLoginID;password=password" providerName="System.Data.SqlClient"/>
        <add name="DNNPos" connectionString="Data Source=10.10.10.10\MSSQLSERVER2014;Initial Catalog=DevFood_POS;user id=myLoginID;password=password" providerName="System.Data.SqlClient"/>       
      </connectionStrings>

Web.Release.config

<connectionStrings>
    <add name="Envy" connectionString="Data Source=test\MSSQLSERVER2014;Initial Catalog=myDB;user id=myLoginID;password=password" providerName="System.Data.SqlClient"
        xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
    <add name="EnvyIdentity" connectionString="Data Source=10.10.10.10\MSSQLSERVER2014;Initial Catalog=myDB;user id=myLoginID;password=password" providerName="System.Data.SqlClient"
        xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
    <add name="DNNSmartstore" connectionString="Data Source=10.10.10.10\MSSQLSERVER2014;Initial Catalog=myDB;user id=myLoginID;password=password" providerName="System.Data.SqlClient"
        xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
    <add name="DNNPos" connectionString="Data Source=10.10.10.10\MSSQLSERVER2014;Initial Catalog=DevFood_POS;user id=myLoginID;password=password" providerName="System.Data.SqlClient"
        xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
  </connectionStrings>

Web.Debug.config is a place to put settings that you want to apply when you deploy to a test server. The name is pretty misleading at first. The only place I ever use this feature is if I have a Test server which needs different settings from my Dev box. :-)