Skip to content

Suspected incompatibility between Serilog.Extensions.Logging 1.3.0 and Microsoft.AspNetCore.AzureAppServicesIntegration 1.0.0 #61

@npnelson

Description

@npnelson

I started upgrading my apps to .NET core 1.1.0 and decided to use the Microsoft.AspNetCore.AzureAppServicesIntegration package. It has a dependency on Microsoft.Extensions.Logging.AzureAppServices which has a dependency on Serilog.Extensions.Logging>=1.0.0.

My apps have a direct dependency on Serilog.Extensions.Logging 1.3.0 and I can't get them to work in Azure. I was able to capture this stacktrace below.

I have a github repo here: https://github.com/npnelson/AzureAppServiceSerilogBug

I'm guessing Serilog.Extensions.Logging removed a method needed by Microsoft.Extensions.Logging.AzureAppServices somewhere along the way.

Unhandled Exception: System.MissingMethodException: Method not found: 'Microsoft.Extensions.Logging.ILoggerFactory Serilog.SerilogLoggerFactoryExtensions.AddSerilog(Microsoft.Extensions.Logging.ILoggerFactory, Serilog.ILogger)'. at Microsoft.Extensions.Logging.AzureAppServices.Internal.AzureAppServicesDiagnosticsLoggerProvider..ctor(WebAppContext context, AzureAppServicesDiagnosticsSettings settings) at Microsoft.Extensions.Logging.AzureAppServicesLoggerFactoryExtensions.AddAzureWebAppDiagnostics(ILoggerFactory factory, AzureAppServicesDiagnosticsSettings settings) at Microsoft.Extensions.Logging.AzureAppServicesLoggerFactoryExtensions.AddAzureWebAppDiagnostics(ILoggerFactory factory) at Microsoft.AspNetCore.Hosting.AppServicesWebHostBuilderExtensions.<>c.<UseAzureAppServices>b__0_0(ILoggerFactory loggerFactory) at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildCommonServices() at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build() at <Redacted>.Program.Main(String[] args) in C:\agent\_work\5\s\src\<Redacted>\Program.cs:line 15

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions