-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Latest mongoDB Driver 2.0 #7
Comments
Is it possible to have the web application project itself with a newer driver than the one your Target depends on? |
The issue is that the new Mongodb driver is a major update with breaking changes. Anything based on the old driver is going to be broken when upgrading to the new driver. You might check out the nuget package: https://www.nuget.org/packages/NLog.MongoDB20/, which is a port of https://github.com/Logrythmik/NLog.MongoDB to utilize the new MongoDB driver 2.0 api. |
Thank you. For me it looks like there are not many contributions in this project. We are going to use Serilog with their offical mongoDB target. |
@pwelter34 Looks resolved, as this project is now using MongoDB.Driver ver. 2.7.0 |
nLog does not work when I upgrade my project to the latest mongoDB Driver:
---> System.TypeInitializationException: The type initializer for 'NLog.Mongo.MongoTarget' threw an exception. ---> System.IO.FileLoadException: Could not load file or assembly 'MongoDB.Driver, Version=1.9.2.235, Culture=neutral, PublicKeyToken=f686731cfb9cc103' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at NLog.Mongo.MongoTarget..cctor()
--- End of inner exception stack trace ---
at NLog.Mongo.MongoTarget..ctor()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.ConstructorInfo.Invoke(Object[] parameters)
at NLog.Internal.FactoryHelper.CreateInstance(Type t)
The text was updated successfully, but these errors were encountered: