MongoDB C# Driver Exception:
Message=Element '' does not match any field or property of class
The problem was a typo with a property called RequiresAuthenticationFlag instead of RequiresAuthentication.
I do not understand why the driver did not include the name of the variable inside the exception.
Why does the driver not include the element name inside the exception?
When I remove some characters of the DB variable's name, it does not throw a meaningful exception.
DB Property Name: Requires
Class Property Name: RequiresAuthentication
Exception does not contain correct field name.
When it is the other way around. It does contain a full name!
(Class contains Requires and DB RequiresAuthentication)
I think that must be a bug in the exception handling?
(I have posted a question on Stackoverflow too and did not get an answer)
Could you help me? Can you reproduce this? I am working on a Windows Server 2012 with the C# Driver and Visual Studio 2015.