Are you using .NET Aspire? I had the same problem, and here's what I did.
For .NET Aspire's client for MongoDB, there are two package versions :
- Aspire.MongoDB.Driver.v3 (version 9.3.0)
- Aspire.MongoDB.Driver (version 9.3.0)
I had to :
1. Uninstall Aspire.MongoDB.Driver
2. Install Aspire.MongoDB.Driver.v3
3. Rename GuidRepresentationMode to GuidRepresentation in my code.