Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Banana Cake Pop the awesome Monaco based GraphQL IDE.
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'.
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
Additional context
No response