-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: 2.19.2
-
Component/s: None
-
None
-
Fully Compatible
-
Not Needed
-
Hi!
After upgrading from 2.19.1 to 2.19.2, when rendering projection definitions (for debug logging) we sometimes encounter the following exception:
Unable to find source-code formatter for language: csharp. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
System.InvalidCastException: Unable to cast object of type 'MongoDB.Bson.BsonString' to type 'MongoDB.Bson.BsonDocument'. BsonDocument MongoDB.Driver.Linq.Linq2Implementation.Translators.AggregateProjectTranslator.TranslateProject(Expression expression, ExpressionTranslationOptions translationOptions) RenderedProjectionDefinition<TResult> MongoDB.Driver.Linq.Linq2Implementation.Translators.AggregateProjectTranslator.Translate<TDocument, TResult>(Expression<Func<TDocument, TResult>> projector, IBsonSerializer<TDocument> parameterSerializer, IBsonSerializerRegistry serializerRegistry, ExpressionTranslationOptions translationOptions) RenderedProjectionDefinition<TOutput> MongoDB.Driver.ExpressionProjectionDefinition<TInput, TOutput>.Render(IBsonSerializer<TInput> inputSerializer, IBsonSerializerRegistry serializerRegistry, LinqProvider linqProvider)
The projection itself is a single field selector: Project(d => d.Id).
- related to
-
CSHARP-4860 2.19.1 -> 2.19.2 FindExpressionProjectionDefinition Issue? Trying to select/project/cast
- Closed