Installing Couchbase Lite on .Net

      +

      Description — How to install Couchbase Lite on .Net
      Abstract — Using Nuget to install Couchbase Lite on csharp

      Quick Steps

      For experienced developers, this is all you need to add Couchbase Lite for C#.Net 3.2.0 to your application projects.

      1. Create or open an existing Visual Studio project

      2. Install either of the following packages from Nuget.

        • Community Edition — Couchbase.Lite package for 3.2.0

        • Enterprise Edition — Couchbase.Lite.Enterprise package for 3.2.0

          • Vector Search Extension — Couchbase.Lite.VectorSearch package for 1.0.0

      3. Within your app, include a call to the relevant Activate() function inside of the class that is included in the support assembly.

      To use Vector Search, you must have Couchbase Lite installed and add the Vector Search extension to your Couchbase Lite application. Vector Search is available only for 64-bit architectures and Intel processors that support the Advanced Vector Extensions 2 (AVX2) instruction set. To verify whether your device supports the AVX2 instructions set, follow these instructions.

      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 to know more about the install or who encountered issues

      Install Methods

      Couchbase recommends installing Nuget packages via PackageReference.

      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.ios

      • Couchbase.Lite.Enterprise.Support.android

      • Couchbase.Lite.Enterprise.Support.NetDesktop

      • Couchbase.Lite.Enterprise.Support.WinUI

      Couchbase.Lite
      • Couchbase.Lite.Support.ios

      • Couchbase.Lite.Support.android

      • Couchbase.Lite.Support.NetDesktop

      • Couchbase.Lite.Support.WinUI

      Couchbase recommends installing Nuget packages via PackageReference.

      To use Vector Search, you must have Couchbase Lite installed and add the Vector Search extension to your Couchbase Lite application. Vector Search is available only for 64-bit architectures and Intel processors that support the Advanced Vector Extensions 2 (AVX2) instruction set. To verify whether your device supports the AVX2 instructions set, follow these instructions.

      Vector Search Package Reference

      This is the recommended method of dependency management for the Vector Search extension because it supports the strict version requirement between the core Couchbase Lite for .Net package and its dependent Support library. You can manage your dependencies by following the steps below:

      1. Add the Couchbase.Lite.Enterprise packages.

      2. Add the Couchbase.Lite.VectorSearch package.

      Activating (on Android platform only)

      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.

      For example:
      Couchbase.Lite.Support.android.Activate()

      The Activate() function is required for applications using .NET on the Android platform in general. This includes Couchbase Lite and the Vector Search extension.

      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.)

      If you have the Couchbase.Lite.VectorSearch package installed, you can activate it by calling the following:

      1. For the Android platform

        Extension.Enable(new VectorSearchExtension(androidContext));

      2. For other platforms

                    Extension.Enable(new VectorSearchExtension());