ChangemakerStudios / serilog-sinks-mongodb

A sink for Serilog that writes events to MongoDB
Apache License 2.0
92 stars 53 forks source link

The GuidRepresentation for the reader is CSharpLegacy, which requires the binary sub type to be UuidLegacy, not UuidStandard #63

Closed thepra closed 3 years ago

thepra commented 3 years ago

As in the title I'm having this issue in my project which is based on .NET 5 and has Serilog.Sinks.MongoDB 4.1.0 Could it be that there's something to update in the library to make compatible with modern versions of MongoDB.Bson/Driver?

Ps: in the project this is the only library that pulls MongoDB.Driver/Bson, I don't have the main libraries of the DB installed.

Jaben commented 3 years ago

This may help: https://desk.cozyroc.com/portal/en/kb/articles/i-got-an-error-the-guidrepresentation-for-the-reader-is-csharplegacy-which-requires-the-binary-sub-type-to-be-uuidlegacy-not-uuidstandard

thepra commented 3 years ago

Did already try that, without success. The only thing that seems to work is to install the latest driver package and the exception goes away. It's still unconvenient and not documented my resolution. Are you sure that there isn't anything that can be done in the code base?

Jaben commented 3 years ago

You upgraded to the latest mongo version and the issue went away? Sounds like a solution to me.

I'll update to the latest when I get a chance or you can submit a PR if you want to help expedite the process.

Jaben commented 3 years ago

Please try latest release.