title: Azure function with dependency injection not starting, because of conflicting references with ILogger
body: <p>Setting up an Azure Function that references other netstandard projects which on their turn reference Microsoft.Extensions.Logging.</p>
  
  <p>When the Function runs locally without any references to the other projects, everything starts fine.  But as soon as I add a reference to one of the other projects, I get the following exception at startup:</p>
  
  <blockquote>
    <p>TestTrigger: Microsoft.Azure.WebJobs.Host: Error indexing method 'TestTrigger'. Microsoft.Azure.WebJobs.Host: Cannot bind parameter 'log' to type ILogger. Make sure the parameter Type is supported by the binding. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.).</p>
  </blockquote>
  
  <p>This is the initial code I have for my Timer function</p>
  
  <pre class="lang-cs prettyprint-override"><code>public class TestTrigger
  {
      private ITester _tester;
      public TestTrigger(ITester tester)
      {
          _tester = tester;
      }
  
      [FunctionName("TestTrigger")]
      public void Run([TimerTrigger("* * * * * *")] TimerInfo myTimer, ILogger log)
      {
          log.LogInformation($"C# Timer trigger function executed at: {DateTime.UtcNow}");
          _tester?.TestMethod().Wait();
      }
  }
  </code></pre>
  
  <p>I have my dependencies injected in the following Startup class</p>
  
  <pre class="lang-cs prettyprint-override"><code>public class Startup : FunctionsStartup
  {
      public override void Configure(IFunctionsHostBuilder builder)
      {
              var cfgBuilder = new ConfigurationBuilder()
                  .SetBasePath(Directory.GetCurrentDirectory())
                  .AddJsonFile($"appsettings.json", true, true)
                  .AddJsonFile($"appsettings.dev.json", true, true)
                  .AddEnvironmentVariables();
              var configuration = cfgBuilder.Build();
              builder.Services
                  .AddSingleton&lt;ITester, Tester&gt;()
                  .AddLogging()
                  .AddOptions();
      }
  }
  </code></pre>
  
  <p>The custom class that implements ITester is part of a netstandard 2.0 project that references the Microsoft.Extensions.Logging.Abstractions 3.0.0.0 nuget package.  The functions project itself is a netcoreapp2.1 project that also references that same nuget package, as well as the Microsoft.NET.Sdk.Functions 1.0.29, the Microsoft.Azure.Functions.Extensions 1.0.0 and the Microsoft.NETCore.App 2.1.0 package.</p>
  
  <p><strong>For reference, the csproj files:</strong></p>
  
  <p>The function project</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;Project Sdk="Microsoft.NET.Sdk"&gt;
      &lt;PropertyGroup&gt;
          &lt;TargetFramework&gt;netcoreapp2.1&lt;/TargetFramework&gt;
          &lt;AzureFunctionsVersion&gt;&lt;/AzureFunctionsVersion&gt;
      &lt;/PropertyGroup&gt;
      &lt;ItemGroup&gt;
          &lt;PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.0.0" /&gt;
          &lt;PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.29" /&gt;
      &lt;/ItemGroup&gt;
      &lt;ItemGroup&gt;
          &lt;None Update="host.json"&gt;
              &lt;CopyToOutputDirectory&gt;PreserveNewest&lt;/CopyToOutputDirectory&gt;
          &lt;/None&gt;
          &lt;None Update="local.settings.json"&gt;
              &lt;CopyToOutputDirectory&gt;PreserveNewest&lt;/CopyToOutputDirectory&gt;
              &lt;CopyToPublishDirectory&gt;Never&lt;/CopyToPublishDirectory&gt;
          &lt;/None&gt;
      &lt;/ItemGroup&gt;
      &lt;ItemGroup&gt;
        &lt;ProjectReference Include="..\TestLibrary\TestLibrary.csproj" /&gt;
      &lt;/ItemGroup&gt;
  &lt;/Project&gt;
  </code></pre>
  
  <p>The referenced project:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;Project Sdk="Microsoft.NET.Sdk"&gt;
  
      &lt;PropertyGroup&gt;
          &lt;TargetFramework&gt;netstandard2.0&lt;/TargetFramework&gt;
      &lt;/PropertyGroup&gt;
  
      &lt;ItemGroup&gt;
        &lt;PackageReference Include="Microsoft.Extensions.Logging" Version="2.2.0" /&gt;
        &lt;PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.0.0" /&gt;
      &lt;/ItemGroup&gt;
  
  &lt;/Project&gt;
  </code></pre>
  
  <p>I am quite sure it's reference issue, but cannot put my hands on it.
  Any help?</p>