Installing Couchbase Lite on .Net
Description — How to install Couchbase Lite on .Net
Abstract — Using Nuget to install Couchbase Lite on csharp
That’s it!
You should be ready to build you app using this version.
The rest of this content contains more detail, for those who want tp know more about the install or who encountered issues
Install Methods
Nuget packages can be installed via PackageReference or packages.config.
Package Reference
This is the recommended method of dependency management because it supports the strict version requirement between the core Couchbase Lite for .Net package and its dependent Support library, which comprises:
Couchbase.Lite.Enterprise-
Couchbase.Lite.Enterprise.Support.UWP -
Couchbase.Lite.Enterprise.Support.ios -
Couchbase.Lite.Enterprise.Support.android -
Couchbase.Lite.Enterprise.Support.NetDesktop
Couchbase.Lite-
Couchbase.Lite.Support.UWP -
Couchbase.Lite.Support.ios -
Couchbase.Lite.Support.android -
Couchbase.Lite.Support.NetDesktop
Package Config
If you are using packages.config, you must take extra care when upgrading the package to make sure that the support libraries you require are also updated to the exact same version.
| Versions that are not the same are incompatible with each other — see: Comparative Table |
Activating (on Android platform only)
Couchbase Lite must be activated before any other calls can be made.
Within your Android app, include a call to the relevant Activate() function inside of the class that is included in the support assembly.
There is only one public class in each support assembly, and the support assembly itself is a nuget dependency.
On Android, this method takes a context argument — typically the ApplicationContext property on your app class.
For example:
Couchbase.Lite.Support.Android.Activate(this.ApplicationContext)
The Activate() function is required for applications using .NET on the Android platform only. It is not required, and the function does not exist, for iOS or UWP.
Currently the support assemblies provide dependency injected mechanisms for default directory logic, and platform specific logging (So, C# will log to logcat with correct log levels and tags. No more "mono-stdout" always at info level.)