var options = new DatabaseConfiguration
Directory = path
started to generate a TypeInitializationException
with the message: “The type initializer for ‘Couchbase.Lite.Sync.HTTPLogic’ threw an exception.”
Is there some new restriction on the paths?
If I revert the library to 2.7.1, OR remove the path, it works.
The path is retrieved using Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
so it points to the local container for my sandboxed application. In my case its: /Users/Paul/Library/Containers/<bundle>/Data/.local/share
The line above that creates a DatabaseConfiguration has always generated an exception that is raised and caught within the DatabaseConfiguration constructor. You only saw it if you had “stop on all exceptions” configured in Visual Studio, and you could happily ignore the exception.
One possibility is that the exception is now being surfaced rather than handled internally?
You really need to give the inner exception in this case because TypeInitializationException only basically says “the static constructor threw an exception” and nothing else. This is a common thing to happen if LiteCore is unable to be loaded properly though. Removing the path is strange because I wouldn’t expect that to have any effect on the static constructor of an unrelated class.
I had a quick look and for sure the symbol _FL_Buf_Release is not present in 2.7.1 but was added for 2.8.0. The logs should show what version of things are being loaded as its first message. Is the LiteCore binary mistakenly in your path somewhere? Is it being cached in the package? Are you able to see that particular symbol in the export list of the binary that is being bundled (I’m assuming here that this is still the experimental Xamarin Mac build?). It points to a stale libLiteCore being loaded.