Skip to content

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

@mikebarber1

Description

@mikebarber1

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();
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions