Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mongo Driver 2.28 Strong Naming change prevents using this package #6

Open
mikebarber1 opened this issue Sep 10, 2024 · 1 comment
Open

Comments

@mikebarber1
Copy link

mikebarber1 commented Sep 10, 2024

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(CollectionName);
var fdb = new FilterDefinitionBuilder();

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

return cursor.ToAsyncEnumerable();
`

@i3arnon
Copy link
Owner

i3arnon commented Sep 10, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants