-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.MissingMethodException: Method not found: 'Serilog.LoggerConfiguration Serilog.LoggerConfigurationMSSqlServerExtensions.MSSqlServer #290
Comments
Hi @saisworld! Thank you for reporting. The SinkOptions methods are the new and recommended API. It was introduced in 5.4.0 but until the next major release (6.0.0) the old methods will still be supported. https://github.com/serilog/serilog-sinks-mssqlserver/releases/tag/v324 Can you please give us a code sample that reproduces the problem? |
Below is the code sample that I have used for creating the logger - `
|
Sorry for the delayed answer. Just a short update: I could reproduce the problem with a small sample program. I'll probably add this one to the sink source under the Investigation continues. |
I found out that the order of the parameters of the problematic configuration extension methods in the generated sink assembly for .NET Standard was different than in the source code. I don't know the exact reason why but when I ordered the parameters in the source code like i observed them in IL disassembler, the MissingMethodException disappeared. I merged a PR to the dev branch with this fix and created a Serilog.Sinks.MSSqlServer.5.4.1-dev-00349 on nuget.org. The source now contains a @saisworld could you please use the Serilog.Sinks.MSSqlServer.5.4.1-dev-00349 and let me know if it fixes the problem for you too? |
Thanks Christian. I will test it and let you know. Appreciate your help in
fixing this issue.
Regards
Sai
On Sun, 7 Jun 2020 at 00:44, Christian Kadluba ***@***.***> wrote:
I found out that the order of the parameters of the problematic
configuration extension methods in the generated sink assembly for .NET
Standard was different than in the source code. I don't know the exact
reason why but when I ordered the parameters in the source code like i
observed them in IL disassembler, the MissingMethodException disappeared.
I merged a PR to the dev branch with this fix. It created a
Serilog.Sinks.MSSqlServer.5.4.1-dev-00349 on nuget.org. The source
already contains a NetStandardDemo now which I used to reproduce and fix
the problem.
@saisworld <https://github.com/saisworld> could you please use the
Serilog.Sinks.MSSqlServer.5.4.1-dev-00349 and let me know if it fixes the
problem for you too?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#290 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKXY3V3MI56GKLB7PHVSTDRVLIFJANCNFSM4NKSAV3A>
.
--
Thanks,
Sai Krishna Siddula
|
@ckadluba , I tried the nuget version Serilog.Sinks.MSSqlServer.5.4.1-dev-00349 and its working as expected. Thank you for fixing this. |
@saisworld you are welcome! I'm glad this is fixed. Thank you for verifying. |
@ckadluba Hello, to me this looks broken again in 5.7.1 using MSSqlServerSinkOptions. Originally had the commented out version with
Reverted to 5.3 and unlined the call and everything works. |
@rusanov-vladimir Can you please provide a sample program to reproduce the problem? |
Bug Report
Latest version of nuget sink.MSSQLServer 5.4.0 is throwing the below error -
System.MissingMethodException: 'Method not found: 'Serilog.LoggerConfiguration Serilog.LoggerConfigurationMSSqlServerExtensions.MSSqlServer(Serilog.Configuration.LoggerSinkConfiguration, System.String, Serilog.Sinks.MSSqlServer.Sinks.MSSqlServer.Options.SinkOptions, Microsoft.Extensions.Configuration.IConfiguration, Serilog.Events.LogEventLevel, System.IFormatProvider, Serilog.Sinks.MSSqlServer.ColumnOptions, Microsoft.Extensions.Configuration.IConfigurationSection, Serilog.Formatting.ITextFormatter, Microsoft.Extensions.Configuration.IConfigurationSection)'.'
When I downgraded the version to 5.3.0, its working as expected. Except that I had to change the signature of
WriteTo.MSSQLServer
, the latest version was expectingSinksOptions
but the older version was all inline.[ ] .NET Standard 2.0
The text was updated successfully, but these errors were encountered: