serilog-mssql / serilog-sinks-mssqlserver

A Serilog sink that writes events to Microsoft SQL Server and Azure SQL
Apache License 2.0
283 stars 148 forks source link

0x80131045 Strong name signature could not be verified after updating to 7.0.0 #567

Closed cancakar35 closed 2 months ago

cancakar35 commented 2 months ago

Please clearly describe what the SQL Sink is doing incorrectly:

After updating Serilog.Sink.MSSqlServer 6.6.0 to 7.0.0 ASP.NET MVC application crashs with 0x80131045 error code.

Please clearly describe the expected behavior:

Not getting error.

List the names and versions of all Serilog packages used in the project:

Target framework and operating system:

.NET Framework 4.8

OS: Windows 10

Provide a simple reproduction of your Serilog configuration code:

Log.Logger = new LoggerConfiguration() .MinimumLevel.Information() .WriteTo.MSSqlServer(ConfigurationManager.ConnectionStrings["logConn"].ConnectionString, sinkOptions: new Serilog.Sinks.MSSqlServer.MSSqlServerSinkOptions { TableName = "Logs", AutoCreateSqlTable = true, AutoCreateSqlDatabase = true }) .CreateLogger();

Provide a simple reproduction of your application code:

https://github.com/cancakar35/serilog-mssql-error-reproduce

cancakar35 commented 2 months ago

@ckadluba 7.0.0-dev-00087 version works. I don't know why but something after this version breaks .net framework.

ckadluba commented 2 months ago

7.0.0-dev-00087 was created by this run https://github.com/serilog-mssql/serilog-sinks-mssqlserver/actions/runs/10698348367/job/29657533168 on 2024-09-04T08:51:33Z using commit https://github.com/serilog-mssql/serilog-sinks-mssqlserver/commit/ea15c5356349c6f0fafd1f8944b63dcb035f0e67 from the dev branch.

Does version 7.0.0-dev-00088 already show the error you describe?

You can easily find out when and from which commit a dev release was created. Just find the publish timestamp of the version on nuget.org and then go to our Release action and find the run with the matching date and time. To verify that it is the correct run, check for the "-dev" version suffix in the logs.

grafik

cancakar35 commented 2 months ago

Does version 7.0.0-dev-00088 already show the error you describe?

Yes. This issiue starts from 00088.

cancakar35 commented 2 months ago

I checked release actions as you said. dev-00087 action worked on windows server but dev-00088 and later actions worked on ubuntu. Related to this pr: https://github.com/serilog-mssql/serilog-sinks-mssqlserver/pull/560

ckadluba commented 2 months ago

Well ... that could explain it. :D I just wonder that there is no error message and the builds from 7.0.0-dev-00088 on still contain the assembly binaries for all target frameworks including .NET Framework.

I will change the build again to run on windows-latest and create a 7.0.1 dev version. Could you use that to verify if it solves the issue?

Edit: Here it is: https://www.nuget.org/packages/Serilog.Sinks.MSSqlServer/7.0.1-dev-00094

cancakar35 commented 2 months ago

It works. Thank you @ckadluba

ckadluba commented 2 months ago

Thank you for testing. I'll create a 7.0.1 latest release later today.

ckadluba commented 2 months ago

Release 7.0.1 was published which fixes this issue.

mstrother-petvet commented 2 months ago

Thank you for fixing this.

ckadluba commented 2 months ago

No problem. Sorry for the inconvenience. ☺️