Mongo C#ドライバー(バージョン1.4.2)は、NLog.LogManager.GetCurrentClassLogger()からNullReferenceExceptionをスロー
します。エラーは、リリースビルドでのみ発生します。デバッグビルドで正常に動作します。NLogとStructuremap
のどちら
に関連しているかわからない
スタックトレース、
System.NullReferenceException
at NLog.LogManager.GetCurrentClassLogger()
at lambda_method(Closure)
at MongoDB.Bson.Serialization.BsonClassMap.CreateInstance()in C:\ work \ 10gen \ mongodb \ mongo-csharp-driver \ Bson \ Serialization\BsonClassMap。 cs:line 429
at MongoDB.Bson.Serialization.BsonClassMapSerializer.Deserialize(BsonReader bsonReader、TypenominalType、Type actualType、IBsonSerializationOptions options)in C:\ work \ 10gen \ mongodb \ mongo-csharp-driver \ Bson \ Serialization \ BsonClassMapSerializer.cs :
MongoDB.Bson.Serialization.BsonClassMapSerializer.Deserialize(BsonReader bsonReader、TypenominalType、IBsonSerializationOptions options)の111行目C:\ work \ 10gen \ mongodb \ mongo-csharp-driver \ Bson \ Serialization \ BsonClassMapSerializer.cs:line 78
MongoDB.DriverのC:\ work \ 10gen \ mongodb \ mongo-csharp-driver \ Bson \ Serialization \ BsonSerializer.cs:line 223の
MongoDB.Bson.Serialization.BsonSerializer.Deserialize(BsonReader bsonReader、TypenominalType、IBsonSerializationOptionsオプション).Internal.MongoReplyMessage 1.GetReply(MongoConnection connection、MongoRequestMessage message)in C:\ work \ 10gen \ mongodb \ mongo-csharp-driver \ Driver \ Core \ MongoCursorEnumerator.cs:line 296
at MongoDB.Driver.MongoCursorEnumerator 1.MoveNext( )C:\ work \ 10gen \ mongodb \ mongo-csharp-driver \ Driver \ Core \ MongoCursorEnumerator.cs:line 141
at System.Linq.Enumerable.FirstOrDefault [TSource](IEnumerable`1 source) 1.ReadFrom(BsonBuffer buffer, IBsonSerializationOptions serializationOptions) in C:\work\10gen\mongodb\mongo-csharp-driver\Driver\Internal\MongoReplyMessage.cs:line 105
at MongoDB.Driver.Internal.MongoConnection.ReceiveMessage[TDocument](BsonBinaryReaderSettings readerSettings, IBsonSerializationOptions serializationOptions) in C:\work\10gen\mongodb\mongo-csharp-driver\Driver\Internal\MongoConnection.cs:line 442
at MongoDB.Driver.MongoCursorEnumerator1.GetFirst() in C:\work\10gen\mongodb\mongo-csharp-driver\Driver\Core\MongoCursorEnumerator.cs:line 251
at MongoDB.Driver.MongoCursorEnumerator