I’m trying to use CSFLE on a M1 Mac with C#. I am on the v2.15.0 driver and starting up the project fails with the following error:
Unhandled exception. System.IO.FileNotFoundException: /Users/Adam/test-dot/Apps/Template/bin/Debug/net6.0/runtimes/osx/native/libmongocrypt.dylib
at MongoDB.Libmongocrypt.LibraryLoader.DarwinLibraryLoader..ctor(String path)
at MongoDB.Libmongocrypt.LibraryLoader..ctor()
at MongoDB.Libmongocrypt.Library.<>c.<.cctor>b__0_50()
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at System.Lazy`1.get_Value()
at MongoDB.Libmongocrypt.Library.<>c.<.cctor>b__0_1()
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at MongoDB.Libmongocrypt.CryptClientFactory.Create(CryptOptions options)
at MongoDB.Driver.Core.Clusters.CryptClientCreator.CreateCryptClient(CryptOptions options)
at MongoDB.Driver.Core.Clusters.CryptClientCreator.CreateCryptClient(IReadOnlyDictionary`2 kmsProviders, IReadOnlyDictionary`2 schemaMap)
at MongoDB.Driver.Encryption.ClientEncryption..ctor(ClientEncryptionOptions clientEncryptionOptions)
at DotNet.Common.MongoEncryption.MongoEncryptionServiceExtensions.AddMongoDbEncryption(IServiceCollection services)
It works fine in rosetta but I’m having issues debugging my app with Rider / VS / VSCode. How can I resolve this?