title: Visual Studio Web Deploy does not modify Connection Strings at Publish time
body: <p>I have a WebApp <code>ASP.Net Core 2.1</code> contains multiple database connection strings, which are specified into an <code>appsettings.json</code> configuration file. When developing locally, they are set to point a Local Database for debugging purposes. </p>
  
  <p>At Publish Time, those connection strings were modified by the <strong>Visual Studio Web Deploy Publisher</strong>, in the settings panel as per screenshot below. But, for a few days,  <strong>those connection strings are no more modified automatically by the publisher</strong>, despite check-boxes "Use this connection string at run time" are checked.</p>
  
  <p>This is super painful : the app crashes right after publishing (cannot connect to databases) and I have to go over FTP to change manually those connection strings.</p>
  
  <h3>Context of the bug</h3>
  
  <p>In the past days, I created a <em>shared</em> <code>appsetting.json</code> file across multiple projects. This shared setting file is referenced as a linked file on every project. On my Web App project, I changed the startup class to embed this additional configuration file into the ConfigurationRoot. Using the default Startup constructor was not embedding this additional setting file. </p>
  
  <pre><code>public class Startup
  {           
      //public Startup(IConfiguration configuration)  //Default Startup constructor which DOES not take into account the  sharedappsettings.json configuration file
      //{
      //    Configuration = configuration;
      //}
  
      public Startup(IHostingEnvironment env)
      {
          var contentRoot = env.ContentRootPath;
  
              var builder = new ConfigurationBuilder()
                  .SetBasePath(contentRoot)
                  .AddJsonFile("appSettings.json")
                  .AddJsonFile("sharedappSettings.json");
              Configuration = builder.Build();
      }
  </code></pre>
  
  <h3>Questions</h3>
  
  <ul>
  <li>Why the publisher not modify anymore the various connection strings, despite the interface shows that it shall do it? </li>
  <li>How can I override this behavior, and change those connection strings at publish time, outside of the Web Deploy interface if not possible otherwise? </li>
  </ul>
  
  <h3>Visual Studio Web Deploy Screenshot</h3>
  
  <p><a href="https://i.stack.imgur.com/xfpO8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xfpO8.png" alt="Visual Studio Web Deploy Publisher"></a></p>