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

HotChocolate.Data.MongoDb not compatible with MongoDB.Driver >= 2.28.0 #7571

Closed
erikkipp opened this issue Oct 7, 2024 · 3 comments
Closed

Comments

@erikkipp
Copy link

erikkipp commented Oct 7, 2024

Product

Hot Chocolate

Version

13.9.14

Link to minimal reproduction

https://github.com/erikkipp/hc-mongodb-issue

Steps to reproduce

Building the solution will cause Error CS0012 : The type 'IMongoCollection<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'MongoDB.Driver, Version=2.19.1.0, Culture=neutral, PublicKeyToken=null'. Downgrade to MongoDB.Driver 2.27.0 from the current version 2.29.0. Build the solution again, should succeed. Something changed in MongoDB.Driver 2.28.0 that is causing this issue.

What is expected?

I should be able to have a reference to an external library that has a reference to MongoDB.Driver and build without error CS0012.

What is actually happening?

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

Relevant log output

1>ActionQueries.cs(15,16): Error CS0012 : The type 'IMongoCollection<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'MongoDB.Driver, Version=2.19.1.0, Culture=neutral, PublicKeyToken=null'.
1>ActionQueries.cs(15,16): Error CS0012 : The type 'IAggregateFluent<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'MongoDB.Driver, Version=2.19.1.0, Culture=neutral, PublicKeyToken=null'.
1>ActionQueries.cs(15,16): Error CS0012 : The type 'IFindFluent<,>' is defined in an assembly that is not referenced. You must add a reference to assembly 'MongoDB.Driver, Version=2.19.1.0, Culture=neutral, PublicKeyToken=null'.

Additional context

No response

@glen-84
Copy link
Collaborator

glen-84 commented Oct 7, 2024

There have been multiple breaking changes in MongoDB.Driver (here & here).

Hot Chocolate v14 supports 2.28.0 and 2.29.0.

@michaelstaib
Copy link
Member

We have upgrade Hot Chocolate 14 so you will need to upgrade.

@erikkipp
Copy link
Author

erikkipp commented Oct 8, 2024

thanks guys

@glen-84 glen-84 removed the 🐛 bug label Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants