cocowalla / serilog-sinks-file-archive

Plugin for the Serilog File sink that works with rolling log files, archiving completed log files before they are deleted by Serilog's retention mechanism
Apache License 2.0
31 stars 8 forks source link

fixed missing strong name #18

Closed tts-sdrissen closed 11 months ago

tts-sdrissen commented 1 year ago

Here is a fix for #3 - "Sign the assembly to get strong-name". I run into this problem as well.

Note, that "Serilog.Sinks.File.Archive.Test" must also be signed, as a reference to the public Key of it is needed in "Serilog.Sinks.File.Archive" for InternalsVisibleTo.

I did this all and run all the tests successfully. Everything is ready to merge.

If you want to generate the keyfile for yourself, what is not really needed, you can do it like this: sn -k serilog-sinks-file-archive.snk sn -k serilog-sinks-file-archive-test.snk

But you will need to update the public Key of "Serilog.Sinks.File.Archive.Test" in CommonAssemblyInfo.cs of "Serilog.Sinks.File.Archive". You can get the public key by doing this: sn -p serilog-sinks-file-archive-test.snk serilog-sinks-file-archive-test-publicKey.snk.tmp sn -tp serilog-sinks-file-archive-test-publicKey.snk.tmp > serilog-sinks-file-archive-test-publicKey.snk.txt.tmp

You will find the public key in serilog-sinks-file-archive-test-publicKey.snk.txt.tmp

cocowalla commented 11 months ago

Just published v1.0.4 with this change, thanks for the contribution!