title: Change connection string from development to production when publishing
body: <p>I want to know how to change automatically the connection string of my app so when I'm working on it in my pc, it uses my local SQL Server and once I publish it then uses the SQL Server I have hosted on azure.</p>
  
  <p>Right now I'm just commenting out the connection string depending of what I want, I saw that the Web.Config file has 2 dependencies, Web.Debug.config and Web.Release.config which is where I guess I have to do something but I don't know what.</p>
  
  <p>This is my web.config file so far</p>
  
  <pre><code>&lt;connectionStrings&gt;
      &lt;add name="MyApp" connectionString="Data Source=mydb.database.windows.net;Initial Catalog=MyDb;User ID=MyUser@mydb.database.windows.net;Password=MyPwd;Encrypt=true;Trusted_Connection=false;" providerName="System.Data.SqlClient" /&gt;
    &lt;!--&lt;add name="MyApp" providerName="System.Data.SqlClient" connectionString="Server=.\SQLEXPRESS;Database=MyDb;Integrated Security=True;" /&gt;--&gt;
    &lt;/connectionStrings
  </code></pre>
  
  <p>As you can see I have 2 connection strings that I have comment out but doing this is really annoying.</p>