Method not found: 'Serilog.LoggerConfiguration Serilog.LoggerConfigurationLogentriesExtensions.Logentries

早过忘川 提交于 2019-12-11 15:27:43

问题


I am working on a .net core project which uses a nuget package say NUGET 1. The package references serilog for logging purpose. Everything works fine till here. The references of serilog can be seen in the image.

As soon as I add another nuget package say NUGET 2. The project still builds but this time I get a runtime error below.

Method not found: 'Serilog.LoggerConfiguration Serilog.LoggerConfigurationLogentriesExtensions.Logentries(Serilog.Configuration.LoggerSinkConfiguration, System.String, Boolean, Int32, System.Nullable`1, Serilog.Events.LogEventLevel, System.String, System.IFormatProvider)'.

The details of second nuget package are in image below. I am unable to figure out exact reason for this.


回答1:


This was due to difference in version of serilog in both nuget packages. I updated the second nuget package to point to same version of serilog. This fixed the issue for me. The similar problem is also described here Method not found: 'Serilog.LoggerConfiguration and the solution for this is also the same.



来源:https://stackoverflow.com/questions/58086137/method-not-found-serilog-loggerconfiguration-serilog-loggerconfigurationlogent

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!