MongoAsyncEnumerableAdapter icon indicating copy to clipboard operation
MongoAsyncEnumerableAdapter copied to clipboard

Mongo Driver 2.28 Strong Naming change prevents using this package

Open mikebarber1 opened this issue 1 year ago • 1 comments

https://www.mongodb.com/community/forums/t/net-c-driver-strong-naming/291649

With "MongoDB.Driver" Version="2.28.0" and the example code below compiling yields error message

Error CS0012 : The type 'IMongoQueryable<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'MongoDB.Driver, Version=2.14.1.0, Culture=neutral, PublicKeyToken=null'.

Downgrading to 2.27 (that does not have Strong Naming) builds successfully.

` var collection = Client.GetDatabase(DatabaseName).GetCollection<TDocument>(CollectionName); var fdb = new FilterDefinitionBuilder<TDocument>();

var fd = fdb.Where(expression); var cursor = await collection.FindAsync(fd, cancellationToken: ct).ConfigureAwait(false);

return cursor.ToAsyncEnumerable(); `

mikebarber1 avatar Sep 10 '24 11:09 mikebarber1

That's very surprising, but it seems you're correct. Thanks for letting me know.

I guess I'll need to publish a strong-named version. I can't gurrantee this will be timely.

i3arnon avatar Sep 10 '24 12:09 i3arnon