Open lazlo-bonin opened 5 years ago
Just tested on v5 alpha 2, I get this error instead:
Exception has occurred: CLR/System.ArgumentException
An unhandled exception of type 'System.ArgumentException' occurred in System.Private.CoreLib.dll: 'EngineSettings must have Filename or DataStream as data source'
at LiteDB.Engine.EngineSettings.CreateDataFactory()
at LiteDB.Engine.DiskService..ctor(EngineSettings settings)
at LiteDB.Engine.LiteEngine..ctor(EngineSettings settings)
at LiteDB.ConnectionString.CreateEngine()
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at LiteDB.LiteCollection`1.Insert(T document)
at TestLiteDB.Program.Main(String[] args) in /Users/lazlo/Projects/TestLiteDB/Program.cs:line 35
try fix your connection string with:
using (var db = new LiteDatabase(@"fiename=MyData.db; Mode=Exclusive"))
Just started testing out LiteDB and I can't get the basic example working without any change.
I already had to add Mode=Exclusive to the connection string to get it working on OSX.
Now I get a ANE a few lines later.
LiteDB v.4.1.4 installed from NuGet. OSX 10.14.5 Mojave.
Full error:
Full Code: