The 2.0.0 Nuget situation

Hello Couchbase Lite users,

You may have run into issues installing Couchbase Lite 2.0.0 from Nuget if running on a non-Windows machine. Or you might be wondering what the difference is between and 2.0.0. This post is to explain both of those. This was originally reported via CBL 2.0.0 NuGets iOS/Android won't install


Our release story is based on some paradigms that I consider important. The main one at play here is “release what you have tested.” This means that instead of testing and then packaging, we package and then test. This leaves one small wrinkle though: The package that is tested has an internal Nuget version (2.0.0-b####) which means it is considered “prerelease.” So how to get it to be release without rebuilding? Well I wrote a script to do that but unfortunately I goofed. The script unzips the nupkg (since it is just a standard zip file), modifies the nuspec with the new version, and then zips it back up again. Simple right? What could go wrong?


Well the thing that went wrong this time stems from some intricacies with the actual zip format. I’m not sure of the exact difference but it seems that when I was using ZipFile::CreateFromDirectory from Powershell, it encoded the resulting zip (i.e. nupkg) with literal backslashes in the filename, so instead of directory/subdirectory/file, there was a file names directory\subdirectory\file. On Windows this is fine, because that is the correct way to make directories but on non-Windows it breaks. The solution is, as usual with zip issues, to use the awesome 7zip command line utility instead. This will properly encode directories.

So what is the difference? In terms of features / binaries absolutely nothing. Both contain the version 2.0.0-b0713 of the library. So use unless you want to try to use 2.0.0 for some reason. If you can, it is fine, if you have trouble installing it then use

I very much dislike putting out 4 digit releases, so next time around I’ll make sure this is not an issue from the start! Thanks!


One more thing. Since we cannot support Xamarin for the enterprise edition just yet, if you are an enterprise user just know that Couchbase.Lite.Enterprise will not install on a Xamarin project (or if it seems like it does you will end up with compile errors). This is by design because I intentionally did not upload the support packages to Nuget.

1 Like