title: Azure Function publish
body: <p>I try to publish Azure Function v.2, but I get an error:</p>
  
  <blockquote>
    <p>The function runtime is unable to start.
    Microsoft.Extensions.Configuration.FileExtensions: The configuration
    file 'local.settings.json' was not found and is not optional. The
    physical path is 'D:\Program Files
    (x86)\SiteExtensions\Functions\2.0.12961\32bit\local.settings.json'.</p>
  </blockquote>
  
  <p>I have the following configuration:</p>
  
  <pre><code>&lt;None Update="local.settings.json"&gt;
    &lt;CopyToOutputDirectory&gt;PreserveNewest&lt;/CopyToOutputDirectory&gt;
    &lt;CopyToPublishDirectory&gt;Always&lt;/CopyToPublishDirectory&gt;
  &lt;/None&gt;
  </code></pre>
  
  <p>and I see this file in Kudu.</p>
  
  <p>How to solve it?</p>
  
  <p><strong>ADDED:</strong></p>
  
  <p>I tried to create another file, named <code>config.json</code>:</p>
  
  <pre><code>{
    "FtpSettings": {
      "FtpServer": "ftp://address/out",
      "FtpLogin": "login",
      "FtpPassword": "pass"
    }
  }
  </code></pre>
  
  <p>then try to read it:</p>
  
  <pre><code>        var config = new ConfigurationBuilder()
              .AddJsonFile("config.json", optional: true, reloadOnChange: true)
              .AddEnvironmentVariables()
              .Build();
  
          builder.Services.AddTransient&lt;FtpService.IFtpService&gt;(s =&gt; new FtpService.Core.FtpService(
              address: config.GetSection("FtpSettings:FtpServer").Value,
              username: config.GetSection("FtpSettings:FtpLogin").Value,
              password: config.GetSection("FtpSettings:FtpPassword").Value
              ));
  </code></pre>
  
  <p>so, my <code>Startup</code> class is:</p>
  
  <pre><code>[assembly: FunctionsStartup(typeof(FunctionAppEfsGetFilesFromFtp.Startup))]
  namespace FunctionAppEfsGetFilesFromFtp
  {
      public class Startup : FunctionsStartup
      {
          public override void Configure(IFunctionsHostBuilder builder)
          {
              var config = new ConfigurationBuilder()
                  .AddJsonFile("config.json", optional: true, reloadOnChange: true)
                  .AddEnvironmentVariables()
                  .Build();
  
              builder.Services.AddTransient&lt;FtpService.IFtpService&gt;(s =&gt; new FtpService.Core.FtpService(
                  address: config.GetSection("FtpSettings:FtpServer").Value,
                  username: config.GetSection("FtpSettings:FtpLogin").Value,
                  password: config.GetSection("FtpSettings:FtpPassword").Value
                  ));
          }
      }
  }
  </code></pre>
  
  <p>but it can't be read too</p>