title: .NET Core - Serilog - IHostBuilder does not contain a definiton of UseSerilog()
body: <p>trying to follow this tutorial : <a href="https://nblumhardt.com/2019/10/serilog-in-aspnetcore-3/" rel="noreferrer">https://nblumhardt.com/2019/10/serilog-in-aspnetcore-3/</a></p>
  <p>I managed to add the Serilog to my app (.NET Core 3.1)</p>
  <p>but I cannot modify the CreateHostBuilder function, since it <strong>does not recognize UseSerilog() function</strong></p>
  <p>I have checked for a solution, but everyone seems to use that code</p>
  <pre><code>using System;
  using Microsoft.AspNetCore.Hosting;
  using Microsoft.Extensions.Hosting;
  using Serilog;
  
  namespace MyApi
  {
      public class Program
      {
          public static void Main(string[] args)
          {
              Log.Logger = new LoggerConfiguration()
              .Enrich.FromLogContext()
              .WriteTo.Console()
              .CreateLogger();
  
              try
              {
                  Log.Information(&quot;Starting up&quot;);
                  CreateHostBuilder(args).Build().Run();
              }
              catch (Exception ex)
              {
                  Log.Fatal(ex, &quot;Application start-up failed&quot;);
              }
              finally
              {
                  Log.CloseAndFlush();
              }
          }
                  
          public static IHostBuilder CreateHostBuilder(string[] args) =&gt;
              Host.CreateDefaultBuilder(args)
                  .UseSerilog() // &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; unknown function
                  .ConfigureWebHostDefaults(webBuilder =&gt;
                  {
                      webBuilder.UseStartup&lt;Startup&gt;();
                  });
      }
  }
  </code></pre>
  <p>what am I missing here ?</p>
  <p>thanks for your help</p>