title: Getting exeption "An error occurred while writing to logger(s)"
body: <p>I found in my log-files following error:</p>
  
  <p><em>An error occurred while writing to logger(s). Could not load file or assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Reference assemblies should not be loaded for execution.  They can only be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058)</em></p>
  
  <p>In case of an exception occur, we are writing the details into a file in azure blob storage. One file per day.
  This exception doesn't occur everytime, just sometimes..</p>
  
  <p>Does anybody know whats the problem?
  We're using following packages:</p>
  
  <pre><code>&lt;PackageReference Include="AspNet.Security.OAuth.Introspection" Version="1.0.0" /&gt;
  &lt;PackageReference Include="AspNet.Security.OAuth.Validation" Version="1.0.0" /&gt;
  &lt;PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.0.4" /&gt;
  &lt;PackageReference Include="Microsoft.AspNetCore.Routing" Version="1.0.4" /&gt;
  &lt;PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="1.0.2" /&gt;
  &lt;PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.0.3" /&gt;
  &lt;PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="1.0.2" /&gt;
  &lt;PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.0.2" /&gt;
  &lt;PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="1.1.5" /&gt;
  &lt;PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="1.0.2" /&gt;
  &lt;PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="1.0.2" /&gt;
  &lt;PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.0.2" /&gt;
  &lt;PackageReference Include="Microsoft.Extensions.Logging" Version="1.1.1" /&gt;
  &lt;PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="1.1.2" /&gt;
  &lt;PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" /&gt;
  &lt;PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.1" /&gt;
  &lt;PackageReference Include="Microsoft.IdentityModel.Tokens" Version="5.1.5" /&gt;
  &lt;PackageReference Include="OpenIddict" Version="1.0.0-rc2-0784" /&gt;
  &lt;PackageReference Include="OpenIddict.Core" Version="1.0.0-rc2-0784" /&gt;
  &lt;PackageReference Include="OpenIddict.EntityFrameworkCore" Version="1.0.0-rc2-0784" /&gt;
  &lt;PackageReference Include="OpenIddict.Mvc" Version="1.0.0-rc2-0784" /&gt;
  &lt;PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="5.1.5" /&gt;
  &lt;PackageReference Include="System.Text.Encodings.Web" Version="4.3.1" /&gt;
  &lt;PackageReference Include="Swashbuckle" Version="6.0.0-beta902" /&gt;
  &lt;PackageReference Include="Serilog" Version="2.6.0" /&gt;
  &lt;PackageReference Include="Serilog.Sinks.AzureTableStorage" Version="4.0.0" /&gt;
  &lt;PackageReference Include="Serilog.Extensions.Logging" Version="2.0.2" /&gt;
  &lt;PackageReference Include="Microsoft.Rest.ClientRuntime" Version="2.3.4" /&gt;
  &lt;PackageReference Include="Newtonsoft.Json" Version="9.0.1" /&gt;
  &lt;PackageReference Include="System.Net.Security" Version="4.3.2" /&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="1.1.5" /&gt;
  &lt;PackageReference Include="Microsoft.EntityFrameworkCore" Version="1.1.5" /&gt;
  &lt;PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="1.1.5" /&gt;
  &lt;PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="1.1.5" /&gt;
  &lt;PackageReference Include="System.Text.Encodings.Web" Version="4.3.1" /&gt;
  &lt;PackageReference Include="System.Net.Http" Version="4.3.2" /&gt;
  &lt;PackageReference Include="OpenIddict" Version="1.0.0-rc2-0784" /&gt;
  &lt;PackageReference Include="System.Net.Security" Version="4.3.1" /&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;PackageReference Include="WindowsAzure.Storage" Version="7.2.1" /&gt;
  </code></pre>
  
  <p>Thanks for your help! :)</p>