We are trying to upgrade a project to .net core 3.1 and also needed to update the MongoDb drivers that we use.
Updated the version to 2.12.2 and this error started to happen:
System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.
----> System.IO.FileLoadException : Could not load file or assembly 'MongoDB.Driver.Legacy, Culture=neutral, PublicKeyToken=null'. Invalid pointer (0x80004003 (E_POINTER))
I looks like the ClientDocumentHelper.CreateDriverDocument method was change a while ago that now checks for the legacy driver, however that throws exceptions in certain test projects.
It looks to start fine in the actual component and unit test but we also have some Specflow tests running and there we cannot get past this exception.
Anyone any clue what to do or would could cause this?