Open stigzler opened 10 months ago
I've opened a Bounty of 50 rep for an exhaustive answer to this on Stackoverflow: https://stackoverflow.com/questions/77539735/litedb-throws-unhandled-exception-when-trying-to-open-a-shared-connection
expiring in 7 days.
Version I am developing on .net Framework 4.8 with LiteDb 5.0.17.0.
Describe the bug When I try to instantiate a database connection with:
I get the following error:
It works fine if I omit the connection specification. I managed to find a few odds and ends for this through google, but couldn't match to my particular use case. However, it looks like something to do with .net versions and Mutex (which I'm not familiar with)??
I did find this in your docs:
"The Shared mode only works in .NET implementations that provide named mutexes. Its multi-process capabilities will only work in platforms that implement named mutexes as system-wide mutexes."
However, I have no idea what this means, whether this applies to Framework 4.8 or not and indeed what to do as a result.
Any suggestions?
Code to Reproduce
Expected behavior Shared Connection is opened